Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
feat(segmented-button): Add new package for segmented button (#6073)
Browse files Browse the repository at this point in the history
  • Loading branch information
gschrag authored Jun 26, 2020
1 parent 39983fa commit d561860
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
@use "@material/notched-outline/mdc-notched-outline";
@use "@material/radio/mdc-radio";
@use "@material/ripple/mdc-ripple";
@use "@material/segmented-button/styles";
@use "@material/select/mdc-select";
@use "@material/slider/mdc-slider";
@use "@material/snackbar/mdc-snackbar";
Expand Down
1 change: 1 addition & 0 deletions packages/material-components-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"@material/radio": "^7.0.0",
"@material/ripple": "^7.0.0",
"@material/rtl": "^7.0.0",
"@material/segmented-button": "^0.0.0",
"@material/select": "^7.0.0",
"@material/shape": "^7.0.0",
"@material/slider": "^7.0.0",
Expand Down
3 changes: 3 additions & 0 deletions packages/mdc-segmented-button/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Segmented Buttons

Segmented buttons allow users to toggle the values of grouped buttons.
23 changes: 23 additions & 0 deletions packages/mdc-segmented-button/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// Copyright 2020 Google Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//

// TODO: Add styles.
19 changes: 19 additions & 0 deletions packages/mdc-segmented-button/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "@material/segmented-button",
"version": "0.0.0",
"description": "The Material Components for the web segmented button component",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/material-components/material-components-web.git",
"directory": "packages/mdc-segmented-button"
},
"keywords": [
"material components",
"material design",
"segmented button"
],
"publishConfig": {
"access": "public"
}
}
23 changes: 23 additions & 0 deletions packages/mdc-segmented-button/styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// Copyright 2020 Google Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//

// TODO: Add styles.
1 change: 1 addition & 0 deletions scripts/webpack/css-bundle-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ class CssBundleFactory {
'mdc.notched-outline': getAbsolutePath('/packages/mdc-notched-outline/mdc-notched-outline.scss'),
'mdc.radio': getAbsolutePath('/packages/mdc-radio/mdc-radio.scss'),
'mdc.ripple': getAbsolutePath('/packages/mdc-ripple/mdc-ripple.scss'),
'mdc.segmented-button': getAbsolutePath('/packages/mdc-segmented-button/styles.scss'),
'mdc.select': getAbsolutePath('/packages/mdc-select/mdc-select.scss'),
'mdc.slider': getAbsolutePath('/packages/mdc-slider/mdc-slider.scss'),
'mdc.snackbar': getAbsolutePath('/packages/mdc-snackbar/mdc-snackbar.scss'),
Expand Down

0 comments on commit d561860

Please sign in to comment.