@czi-sds/mcp 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/component-props/Accordion.json +14 -15
- package/data/component-props/Alert.json +2 -44
- package/data/component-props/Autocomplete.json +14 -32
- package/data/component-props/Banner.json +11 -12
- package/data/component-props/Button.json +17 -82
- package/data/component-props/ButtonDropdown.json +26 -0
- package/data/component-props/ButtonIcon.json +4 -60
- package/data/component-props/ButtonToggle.json +2 -66
- package/data/component-props/Callout.json +11 -65
- package/data/component-props/CellBasic.json +28 -56
- package/data/component-props/CellComponent.json +4 -32
- package/data/component-props/CellHeader.json +13 -49
- package/data/component-props/ComplexFilter.json +24 -4
- package/data/component-props/ContentCard.json +66 -2
- package/data/component-props/Dialog.json +26 -0
- package/data/component-props/Dropdown.json +29 -67
- package/data/component-props/DropdownMenu.json +16 -56
- package/data/component-props/HeatmapChart.json +6 -87
- package/data/component-props/Icon.json +3 -8
- package/data/component-props/InputCheckbox.json +5 -53
- package/data/component-props/InputDropdown.json +11 -33
- package/data/component-props/InputRadio.json +5 -53
- package/data/component-props/InputSearch.json +6 -70
- package/data/component-props/InputSlider.json +21 -35
- package/data/component-props/InputText.json +7 -63
- package/data/component-props/InputToggle.json +5 -54
- package/data/component-props/Link.json +18 -0
- package/data/component-props/LoadingIndicator.json +1 -2
- package/data/component-props/MenuItem.json +11 -41
- package/data/component-props/MenuSelect.json +4 -67
- package/data/component-props/NavigationFooter.json +0 -8
- package/data/component-props/NavigationHeader.json +14 -65
- package/data/component-props/NavigationJumpTo.json +0 -40
- package/data/component-props/Notification.json +14 -58
- package/data/component-props/Pagination.json +8 -33
- package/data/component-props/Panel.json +4 -54
- package/data/component-props/SegmentedControl.json +0 -55
- package/data/component-props/TableRow.json +10 -38
- package/data/component-props/Tabs.json +18 -0
- package/data/component-props/Tag.json +10 -56
- package/data/component-props/TagFilter.json +0 -47
- package/data/component-props/Tooltip.json +12 -61
- package/data/component-props/TooltipCondensed.json +18 -0
- package/data/component-props/TooltipTable.json +0 -4
- package/data/zeroheight-exports/Accordion.md +167 -125
- package/data/zeroheight-exports/Banner.md +71 -48
- package/data/zeroheight-exports/Borders.md +72 -73
- package/data/zeroheight-exports/Buttons.md +375 -330
- package/data/zeroheight-exports/Callout.md +138 -116
- package/data/zeroheight-exports/Colors.md +254 -255
- package/data/zeroheight-exports/Content-Card.md +36 -37
- package/data/zeroheight-exports/Contributing-to-SDS.md +34 -35
- package/data/zeroheight-exports/Control-Inputs.md +289 -234
- package/data/zeroheight-exports/Corners.md +63 -64
- package/data/zeroheight-exports/Cover-page.md +0 -1
- package/data/zeroheight-exports/Dialog.md +237 -179
- package/data/zeroheight-exports/Downloads.md +10 -11
- package/data/zeroheight-exports/Drop-Shadows.md +40 -41
- package/data/zeroheight-exports/Dropdown-Input.md +158 -127
- package/data/zeroheight-exports/Dropdown-Menu.md +814 -718
- package/data/zeroheight-exports/Element-Status-Tracker.md +191 -192
- package/data/zeroheight-exports/Field-Inputs.md +149 -130
- package/data/zeroheight-exports/Filters.md +114 -94
- package/data/zeroheight-exports/Getting-Started.md +112 -249
- package/data/zeroheight-exports/Hero.md +43 -37
- package/data/zeroheight-exports/Icons.md +205 -206
- package/data/zeroheight-exports/Intent.md +6 -7
- package/data/zeroheight-exports/Introduction-to-Bases.md +8 -9
- package/data/zeroheight-exports/Introduction-to-Cells.md +11 -12
- package/data/zeroheight-exports/Introduction-to-DNA.md +8 -9
- package/data/zeroheight-exports/Introduction-to-Genes.md +8 -9
- package/data/zeroheight-exports/Introduction.md +52 -53
- package/data/zeroheight-exports/Link.md +50 -37
- package/data/zeroheight-exports/Lists.md +78 -63
- package/data/zeroheight-exports/Loading-Indicator.md +7 -8
- package/data/zeroheight-exports/Navigation.md +163 -142
- package/data/zeroheight-exports/Notification.md +132 -102
- package/data/zeroheight-exports/Panel.md +231 -115
- package/data/zeroheight-exports/Responsive-Design.md +35 -32
- package/data/zeroheight-exports/Search-Input.md +9 -10
- package/data/zeroheight-exports/Search.md +87 -104
- package/data/zeroheight-exports/Segmented-Control.md +68 -45
- package/data/zeroheight-exports/Spacing.md +210 -211
- package/data/zeroheight-exports/Table.md +414 -302
- package/data/zeroheight-exports/Tabs.md +126 -98
- package/data/zeroheight-exports/Tags.md +148 -118
- package/data/zeroheight-exports/Text-Link.md +32 -33
- package/data/zeroheight-exports/Theming.md +48 -29
- package/data/zeroheight-exports/Tooltips.md +253 -237
- package/data/zeroheight-exports/Typography.md +463 -464
- package/dist/stdio.js +44 -132
- package/package.json +3 -4
- package/data/component-props/Chip.json +0 -73
- package/data/component-props/List.json +0 -43
- package/data/component-props/Menu.json +0 -48
- package/data/component-props/Table.json +0 -26
- package/data/component-props-storybook/Accordion-storybook.json +0 -45
- package/data/component-props-storybook/Alert-storybook.json +0 -30
- package/data/component-props-storybook/Autocomplete-storybook.json +0 -67
- package/data/component-props-storybook/Banner-storybook.json +0 -78
- package/data/component-props-storybook/Button-storybook.json +0 -115
- package/data/component-props-storybook/ButtonDropdown-storybook.json +0 -73
- package/data/component-props-storybook/ButtonIcon-storybook.json +0 -60
- package/data/component-props-storybook/ButtonToggle-storybook.json +0 -68
- package/data/component-props-storybook/Callout-storybook.json +0 -90
- package/data/component-props-storybook/CellBasic-storybook.json +0 -138
- package/data/component-props-storybook/CellComponent-storybook.json +0 -48
- package/data/component-props-storybook/CellHeader-storybook.json +0 -71
- package/data/component-props-storybook/Chip-storybook.json +0 -26
- package/data/component-props-storybook/ComplexFilter-storybook.json +0 -60
- package/data/component-props-storybook/ContentCard-storybook.json +0 -175
- package/data/component-props-storybook/Dialog-storybook.json +0 -56
- package/data/component-props-storybook/Dropdown-storybook.json +0 -93
- package/data/component-props-storybook/DropdownMenu-storybook.json +0 -73
- package/data/component-props-storybook/HeatmapChart-storybook.json +0 -55
- package/data/component-props-storybook/Icon-storybook.json +0 -75
- package/data/component-props-storybook/InputCheckbox-storybook.json +0 -57
- package/data/component-props-storybook/InputDropdown-storybook.json +0 -80
- package/data/component-props-storybook/InputRadio-storybook.json +0 -56
- package/data/component-props-storybook/InputSearch-storybook.json +0 -55
- package/data/component-props-storybook/InputSlider-storybook.json +0 -55
- package/data/component-props-storybook/InputText-storybook.json +0 -59
- package/data/component-props-storybook/InputToggle-storybook.json +0 -42
- package/data/component-props-storybook/Link-storybook.json +0 -50
- package/data/component-props-storybook/List-storybook.json +0 -26
- package/data/component-props-storybook/LoadingIndicator-storybook.json +0 -34
- package/data/component-props-storybook/Menu-storybook.json +0 -26
- package/data/component-props-storybook/MenuItem-storybook.json +0 -74
- package/data/component-props-storybook/MenuSelect-storybook.json +0 -38
- package/data/component-props-storybook/NavigationFooter-storybook.json +0 -67
- package/data/component-props-storybook/NavigationHeader-storybook.json +0 -115
- package/data/component-props-storybook/NavigationJumpTo-storybook.json +0 -41
- package/data/component-props-storybook/Notification-storybook.json +0 -89
- package/data/component-props-storybook/Pagination-storybook.json +0 -50
- package/data/component-props-storybook/Panel-storybook.json +0 -52
- package/data/component-props-storybook/SegmentedControl-storybook.json +0 -30
- package/data/component-props-storybook/Table-storybook.json +0 -26
- package/data/component-props-storybook/TableHeader-storybook.json +0 -26
- package/data/component-props-storybook/TableRow-storybook.json +0 -62
- package/data/component-props-storybook/Tabs-storybook.json +0 -45
- package/data/component-props-storybook/Tag-storybook.json +0 -78
- package/data/component-props-storybook/TagFilter-storybook.json +0 -30
- package/data/component-props-storybook/Tooltip-storybook.json +0 -85
- package/data/component-props-storybook/TooltipCondensed-storybook.json +0 -38
- package/data/component-props-storybook/TooltipTable-storybook.json +0 -47
|
@@ -6,8 +6,8 @@ Buttons are one of the primary ways users interact with and provide input to the
|
|
|
6
6
|
|
|
7
7
|
## Button Variants
|
|
8
8
|
|
|
9
|
-
| There are a range of Button variants available for designers to use in their layouts depending on the amount of emphasis the Button needs to have, its location in the UI, and whether it is existing alone or alongside other Buttons.
|
|
10
|
-
|
|
|
9
|
+
| There are a range of Button variants available for designers to use in their layouts depending on the amount of emphasis the Button needs to have, its location in the UI, and whether it is existing alone or alongside other Buttons. Follow the usage criteria accompanying each variant as a guide for selecting the correct Button for any given use case. | | **Jump to variant:** Square Copy Icon |
|
|
10
|
+
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------- |
|
|
11
11
|
|
|
12
12
|
### Visual Preview
|
|
13
13
|
|
|
@@ -17,8 +17,8 @@ Use the links below to jump to information on a specific Button variant:
|
|
|
17
17
|
|
|
18
18
|
## Square Button
|
|
19
19
|
|
|
20
|
-
|
|
|
21
|
-
| --- |
|
|
20
|
+
| | In Figma | | | Meets Accessibility | | | In napari hub + .org Codebases |
|
|
21
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ------------------------------ |
|
|
22
22
|
|
|
23
23
|
### Large Primary Square Button
|
|
24
24
|
|
|
@@ -27,7 +27,7 @@ Use for primary or emphasized actions.
|
|
|
27
27
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
28
28
|
|
|
29
29
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
30
|
-
|
|
|
30
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
31
31
|
|
|
32
32
|
### Small Primary Square Button
|
|
33
33
|
|
|
@@ -36,7 +36,7 @@ Use for actions that are lower importance or don't require as much emphasis on t
|
|
|
36
36
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
37
37
|
|
|
38
38
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
39
|
-
|
|
|
39
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
40
40
|
|
|
41
41
|
### Secondary Square Button
|
|
42
42
|
|
|
@@ -47,7 +47,7 @@ Note: there is no small secondary square Button.
|
|
|
47
47
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
48
48
|
|
|
49
49
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
50
|
-
|
|
|
50
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
51
51
|
|
|
52
52
|
---
|
|
53
53
|
|
|
@@ -59,15 +59,15 @@ These rules establish how much margin should exist between and around elements.
|
|
|
59
59
|
|
|
60
60
|
## Copy Button
|
|
61
61
|
|
|
62
|
-
|
|
|
63
|
-
| --- |
|
|
62
|
+
| | In Figma | | | Meets Accessibility | | | In napari hub + .org Codebases |
|
|
63
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ------------------------------ |
|
|
64
64
|
|
|
65
|
-
Used inline within body copy when providing instructions to users that involve copying content. Any content that would need to be easily accessible by the user can be tied to the Copy Button. When clicked, the content tied to it is copied to the user's clipboard.
|
|
65
|
+
Used inline within body copy when providing instructions to users that involve copying content. Any content that would need to be easily accessible by the user can be tied to the Copy Button. When clicked, the content tied to it is copied to the user's clipboard.
|
|
66
66
|
|
|
67
67
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
68
68
|
|
|
69
69
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
70
|
-
|
|
|
70
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
71
71
|
|
|
72
72
|
---
|
|
73
73
|
|
|
@@ -75,14 +75,14 @@ Click on each state below to enter inspect view and get details on its code attr
|
|
|
75
75
|
|
|
76
76
|
These rules establish how much margin should exist between and around elements.
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
|
|
79
79
|
|
|
80
80
|
---
|
|
81
81
|
|
|
82
82
|
## Icon Button
|
|
83
83
|
|
|
84
|
-
|
|
|
85
|
-
| --- |
|
|
84
|
+
| | In Figma | | | Meets Accessibility | | | In napari hub + .org Codebase |
|
|
85
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ----------------------------- |
|
|
86
86
|
|
|
87
87
|
### Large Icon Button
|
|
88
88
|
|
|
@@ -93,7 +93,7 @@ Use the Icon Button size that is most appropriate for the design it is being use
|
|
|
93
93
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
94
94
|
|
|
95
95
|
| **Default** | **Hover** | **Pressed** |
|
|
96
|
-
|
|
|
96
|
+
| ----------- | --------- | ----------- |
|
|
97
97
|
|
|
98
98
|
### Medium Icon Button
|
|
99
99
|
|
|
@@ -104,7 +104,7 @@ Use the Icon Button size that is most appropriate for the design it is being use
|
|
|
104
104
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
105
105
|
|
|
106
106
|
| **Default** | **Hover** | **Pressed** |
|
|
107
|
-
|
|
|
107
|
+
| ----------- | --------- | ----------- |
|
|
108
108
|
|
|
109
109
|
### Small Icon Button
|
|
110
110
|
|
|
@@ -115,7 +115,7 @@ Use the Icon Button size that is most appropriate for the design it is being use
|
|
|
115
115
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
116
116
|
|
|
117
117
|
| **Default** | **Hover** | **Pressed** |
|
|
118
|
-
|
|
|
118
|
+
| ----------- | --------- | ----------- |
|
|
119
119
|
|
|
120
120
|
---
|
|
121
121
|
|
|
@@ -123,18 +123,18 @@ Click on each state below to enter inspect view and get details on its code attr
|
|
|
123
123
|
|
|
124
124
|
These rules establish how much margin should exist between and around elements.
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
|
|
127
127
|
|
|
128
128
|
## Code
|
|
129
129
|
|
|
130
130
|
## Button Components
|
|
131
131
|
|
|
132
|
-
| Below you will find interactive Storybook iframes for each component within the Button element group.
|
|
133
|
-
|
|
|
132
|
+
| Below you will find interactive Storybook iframes for each component within the Button element group. Tabs within each iframe provide a different set of tools: The Controls tab allows you to see and adjust all available props. The Actions tab shows you data displayed by event handler arguments. | | **Jump to component:** Button ButtonIcon |
|
|
133
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ---------------------------------------- |
|
|
134
134
|
|
|
135
135
|
---
|
|
136
136
|
|
|
137
|
-
>These components appear as they are in the default SDS codebase. Once imported into the napari hub or napari.org codebases, use a theme file to enable the napari visual appearance customization.
|
|
137
|
+
> These components appear as they are in the default SDS codebase. Once imported into the napari hub or napari.org codebases, use a theme file to enable the napari visual appearance customization.
|
|
138
138
|
|
|
139
139
|
### Button
|
|
140
140
|
|
|
@@ -154,8 +154,8 @@ Buttons are one of the primary ways users interact with and provide input to the
|
|
|
154
154
|
|
|
155
155
|
## Button Variants
|
|
156
156
|
|
|
157
|
-
| There are a range of Button variants available for designers to use in their layouts depending on the amount of emphasis the Button needs to have, its location in the UI, and whether it is existing alone or alongside other Buttons.
|
|
158
|
-
|
|
|
157
|
+
| There are a range of Button variants available for designers to use in their layouts depending on the amount of emphasis the Button needs to have, its location in the UI, and whether it is existing alone or alongside other Buttons. Follow the usage criteria accompanying each variant as a guide for selecting the correct Button for any given use case. | | **Jump to variant:** Rounded Square Minimal Icon Rounded Dropdown Square Dropdown |
|
|
158
|
+
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | --------------------------------------------------------------------------------- |
|
|
159
159
|
|
|
160
160
|
### Visual Preview
|
|
161
161
|
|
|
@@ -165,8 +165,8 @@ Use the links below to jump to information on a specific Button variant:
|
|
|
165
165
|
|
|
166
166
|
## Rounded Button
|
|
167
167
|
|
|
168
|
-
|
|
|
169
|
-
| --- |
|
|
168
|
+
| | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
|
|
169
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
|
|
170
170
|
|
|
171
171
|
### Primary Rounded Button
|
|
172
172
|
|
|
@@ -177,14 +177,14 @@ Include an icon when needing to provide additional context to users of what acti
|
|
|
177
177
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
178
178
|
|
|
179
179
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
180
|
-
|
|
|
180
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
181
|
+
|
|
182
|
+
| **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
|
|
183
|
+
| ------------------ | --------- | ----------- | ------------ |
|
|
184
|
+
|
|
181
185
|
|
|
182
|
-
| **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
|
|
183
|
-
| --- | --- | --- | --- |
|
|
184
186
|
|
|
185
|
-
|
|
186
187
|
|
|
187
|
-
|
|
188
188
|
|
|
189
189
|
### Secondary Rounded Button
|
|
190
190
|
|
|
@@ -195,12 +195,12 @@ Include an icon when needing to provide additional context to users of what acti
|
|
|
195
195
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
196
196
|
|
|
197
197
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
198
|
-
|
|
|
198
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
199
|
+
|
|
200
|
+
| **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
|
|
201
|
+
| ------------------ | --------- | ----------- | ------------ |
|
|
199
202
|
|
|
200
|
-
| **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
|
|
201
|
-
| --- | --- | --- | --- |
|
|
202
203
|
|
|
203
|
-
|
|
204
204
|
|
|
205
205
|
### Error Rounded Button
|
|
206
206
|
|
|
@@ -210,11 +210,11 @@ Include an icon when needing to provide additional context to users of what acti
|
|
|
210
210
|
|
|
211
211
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
212
212
|
|
|
213
|
-
| **Default** |
|
|
214
|
-
|
|
|
213
|
+
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
214
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
215
215
|
|
|
216
|
-
| **Default + Icon** |
|
|
217
|
-
|
|
|
216
|
+
| **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
|
|
217
|
+
| ------------------ | --------- | ----------- | ------------ |
|
|
218
218
|
|
|
219
219
|
---
|
|
220
220
|
|
|
@@ -226,8 +226,8 @@ These rules establish how much margin should exist between and around elements.
|
|
|
226
226
|
|
|
227
227
|
## Square Button
|
|
228
228
|
|
|
229
|
-
|
|
|
230
|
-
| --- |
|
|
229
|
+
| | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
|
|
230
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
|
|
231
231
|
|
|
232
232
|
### Primary Square Button
|
|
233
233
|
|
|
@@ -238,10 +238,10 @@ Include an icon when needing to provide additional context to users of what acti
|
|
|
238
238
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
239
239
|
|
|
240
240
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
241
|
-
|
|
|
241
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
242
242
|
|
|
243
|
-
| **Default + Icon** | **Hover**
|
|
244
|
-
|
|
|
243
|
+
| **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
|
|
244
|
+
| ------------------ | --------- | ----------- | ------------ |
|
|
245
245
|
|
|
246
246
|
### Secondary Square Button
|
|
247
247
|
|
|
@@ -252,10 +252,10 @@ Include an icon when needing to provide additional context to users of what acti
|
|
|
252
252
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
253
253
|
|
|
254
254
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
255
|
-
|
|
|
255
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
256
256
|
|
|
257
|
-
| **Default + Icon** |
|
|
258
|
-
|
|
|
257
|
+
| **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
|
|
258
|
+
| ------------------ | --------- | ----------- | ------------ |
|
|
259
259
|
|
|
260
260
|
### Error Square Button
|
|
261
261
|
|
|
@@ -266,10 +266,10 @@ Include an icon when needing to provide additional context to users of what acti
|
|
|
266
266
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
267
267
|
|
|
268
268
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
269
|
-
|
|
|
269
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
270
270
|
|
|
271
271
|
| **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
|
|
272
|
-
|
|
|
272
|
+
| ------------------ | --------- | ----------- | ------------ |
|
|
273
273
|
|
|
274
274
|
---
|
|
275
275
|
|
|
@@ -281,8 +281,8 @@ These rules establish how much margin should exist between and around elements.
|
|
|
281
281
|
|
|
282
282
|
## Minimal Button
|
|
283
283
|
|
|
284
|
-
|
|
|
285
|
-
| --- |
|
|
284
|
+
| | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
|
|
285
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
|
|
286
286
|
|
|
287
287
|
### Primary Minimal Button
|
|
288
288
|
|
|
@@ -295,12 +295,12 @@ Include an icon when needing to provide additional context to users of what acti
|
|
|
295
295
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
296
296
|
|
|
297
297
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
298
|
-
|
|
|
298
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
299
|
+
|
|
300
|
+
| **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
|
|
301
|
+
| ------------------ | --------- | ----------- | ------------ |
|
|
299
302
|
|
|
300
|
-
| **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
|
|
301
|
-
| --- | --- | --- | --- |
|
|
302
303
|
|
|
303
|
-
|
|
304
304
|
|
|
305
305
|
### Secondary Minimal Button
|
|
306
306
|
|
|
@@ -311,7 +311,7 @@ Note: only Primary Minimal Buttons can be paired with icons.
|
|
|
311
311
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
312
312
|
|
|
313
313
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
314
|
-
|
|
|
314
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
315
315
|
|
|
316
316
|
---
|
|
317
317
|
|
|
@@ -323,8 +323,8 @@ These rules establish how much margin should exist between and around elements.
|
|
|
323
323
|
|
|
324
324
|
## Icon Button
|
|
325
325
|
|
|
326
|
-
|
|
|
327
|
-
| --- |
|
|
326
|
+
| | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
|
|
327
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
|
|
328
328
|
|
|
329
329
|
### Large Primary Icon Button
|
|
330
330
|
|
|
@@ -337,7 +337,7 @@ Icon Buttons can be coupled with a Dropdown Menu when there are multiple options
|
|
|
337
337
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
338
338
|
|
|
339
339
|
| **Default (Off)** | **Hover (Off)** | **Pressed** | **Default (On)** | **Hover (On)** | **Disabled** |
|
|
340
|
-
|
|
|
340
|
+
| ----------------- | --------------- | ----------- | ---------------- | -------------- | ------------ |
|
|
341
341
|
|
|
342
342
|
### Small Primary Icon Button
|
|
343
343
|
|
|
@@ -350,7 +350,7 @@ Icon Buttons can be coupled with a Dropdown Menu when there are multiple options
|
|
|
350
350
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
351
351
|
|
|
352
352
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
353
|
-
|
|
|
353
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
354
354
|
|
|
355
355
|
### Large Secondary Icon Button
|
|
356
356
|
|
|
@@ -363,7 +363,7 @@ Icon Buttons can be coupled with a Dropdown Menu when there are multiple options
|
|
|
363
363
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
364
364
|
|
|
365
365
|
| **Default (Off)** | **Hover (Off)** | **Default (On)** | **Hover (On)** | **Disabled** |
|
|
366
|
-
|
|
|
366
|
+
| ----------------- | --------------- | ---------------- | -------------- | ------------ |
|
|
367
367
|
|
|
368
368
|
### Small Secondary Icon Button
|
|
369
369
|
|
|
@@ -376,7 +376,7 @@ Icon Buttons can be coupled with a Dropdown Menu when there are multiple options
|
|
|
376
376
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
377
377
|
|
|
378
378
|
| **Default (Off)** | **Hover (Off)** | **Default (On)** | **Hover (On)** | **Disabled** |
|
|
379
|
-
|
|
|
379
|
+
| ----------------- | --------------- | ---------------- | -------------- | ------------ |
|
|
380
380
|
|
|
381
381
|
### Large Tertiary Icon Button
|
|
382
382
|
|
|
@@ -387,7 +387,7 @@ Use the Tertiary Icon Button size that is most appropriate for the design it is
|
|
|
387
387
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
388
388
|
|
|
389
389
|
| **Default** | **Hover** | **Pressed** |
|
|
390
|
-
|
|
|
390
|
+
| ----------- | --------- | ----------- |
|
|
391
391
|
|
|
392
392
|
### Medium Tertiary Icon Button
|
|
393
393
|
|
|
@@ -398,7 +398,7 @@ Use the Tertiary Icon Button size that is most appropriate for the design it is
|
|
|
398
398
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
399
399
|
|
|
400
400
|
| **Default** | **Hover** | **Pressed** |
|
|
401
|
-
|
|
|
401
|
+
| ----------- | --------- | ----------- |
|
|
402
402
|
|
|
403
403
|
### Small Tertiary Icon Button
|
|
404
404
|
|
|
@@ -409,7 +409,7 @@ Use the Tertiary Icon Button size that is most appropriate for the design it is
|
|
|
409
409
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
410
410
|
|
|
411
411
|
| **Default** | **Hover** | **Pressed** |
|
|
412
|
-
|
|
|
412
|
+
| ----------- | --------- | ----------- |
|
|
413
413
|
|
|
414
414
|
---
|
|
415
415
|
|
|
@@ -421,8 +421,8 @@ These rules establish how much margin should exist between and around elements.
|
|
|
421
421
|
|
|
422
422
|
## Rounded Dropdown Button
|
|
423
423
|
|
|
424
|
-
|
|
|
425
|
-
| --- |
|
|
424
|
+
| | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
|
|
425
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
|
|
426
426
|
|
|
427
427
|
### Primary Rounded Dropdown Button
|
|
428
428
|
|
|
@@ -435,9 +435,9 @@ The options are presented in a dropdown menu; use in conjunction with Dropdown M
|
|
|
435
435
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
436
436
|
|
|
437
437
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
438
|
-
|
|
|
438
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
439
|
+
|
|
439
440
|
|
|
440
|
-
|
|
441
441
|
|
|
442
442
|
### Secondary Rounded Dropdown Button
|
|
443
443
|
|
|
@@ -448,7 +448,7 @@ The options are presented in a dropdown menu; use in conjunction with Dropdown M
|
|
|
448
448
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
449
449
|
|
|
450
450
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
451
|
-
|
|
|
451
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
452
452
|
|
|
453
453
|
---
|
|
454
454
|
|
|
@@ -458,12 +458,12 @@ These rules establish how much margin should exist between and around elements.
|
|
|
458
458
|
|
|
459
459
|
---
|
|
460
460
|
|
|
461
|
-
|
|
461
|
+
|
|
462
462
|
|
|
463
463
|
## Square Dropdown Button
|
|
464
464
|
|
|
465
|
-
|
|
|
466
|
-
| --- |
|
|
465
|
+
| | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
|
|
466
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
|
|
467
467
|
|
|
468
468
|
### Primary Square Dropdown Button
|
|
469
469
|
|
|
@@ -476,7 +476,7 @@ The options are presented in a dropdown menu; use in conjunction with Dropdown M
|
|
|
476
476
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
477
477
|
|
|
478
478
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
479
|
-
|
|
|
479
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
480
480
|
|
|
481
481
|
### Secondary Square Dropdown Button
|
|
482
482
|
|
|
@@ -489,7 +489,7 @@ The options are presented in a dropdown menu; use in conjunction with Dropdown M
|
|
|
489
489
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
490
490
|
|
|
491
491
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
492
|
-
|
|
|
492
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
493
493
|
|
|
494
494
|
---
|
|
495
495
|
|
|
@@ -501,12 +501,12 @@ These rules establish how much margin should exist between and around elements.
|
|
|
501
501
|
|
|
502
502
|
## Button Components
|
|
503
503
|
|
|
504
|
-
| Below you will find interactive Storybook iframes for each component within the Button element group.
|
|
505
|
-
|
|
|
504
|
+
| Below you will find interactive Storybook iframes for each component within the Button element group. Tabs within each iframe provide a different set of tools: The Controls tab allows you to see and adjust all available props. The Actions tab shows you data displayed by event handler arguments. | | **Jump to component:** Button ButtonIcon ButtonDropdown |
|
|
505
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------------------------- |
|
|
506
506
|
|
|
507
507
|
---
|
|
508
508
|
|
|
509
|
-
>These components appear as they are in the default SDS codebase. Once imported into the CZ GEN EPI codebase, use a theme file to enable the CZ GEN EPI visual appearance customization.
|
|
509
|
+
> These components appear as they are in the default SDS codebase. Once imported into the CZ GEN EPI codebase, use a theme file to enable the CZ GEN EPI visual appearance customization.
|
|
510
510
|
|
|
511
511
|
### Button
|
|
512
512
|
|
|
@@ -532,8 +532,8 @@ Buttons are one of the primary ways users interact with and provide input to the
|
|
|
532
532
|
|
|
533
533
|
## Button Variants
|
|
534
534
|
|
|
535
|
-
| There are a range of Button variants available for designers to use in their layouts depending on the amount of emphasis the Button needs to have, its location in the UI, and whether it is existing alone or alongside other Buttons.
|
|
536
|
-
|
|
|
535
|
+
| There are a range of Button variants available for designers to use in their layouts depending on the amount of emphasis the Button needs to have, its location in the UI, and whether it is existing alone or alongside other Buttons. Follow the usage criteria accompanying each variant as a guide for selecting the correct Button for any given use case. | | **Jump to variant:** Rounded Square Minimal Icon Rounded Dropdown |
|
|
536
|
+
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ----------------------------------------------------------------- |
|
|
537
537
|
|
|
538
538
|
### Visual Preview
|
|
539
539
|
|
|
@@ -543,8 +543,8 @@ Use the links below to jump to information on a specific Button variant:
|
|
|
543
543
|
|
|
544
544
|
## Rounded Button
|
|
545
545
|
|
|
546
|
-
|
|
|
547
|
-
| --- |
|
|
546
|
+
| | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
|
|
547
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
|
|
548
548
|
|
|
549
549
|
### Primary Rounded Button
|
|
550
550
|
|
|
@@ -555,12 +555,12 @@ Include an icon when needing to provide additional context to users of what acti
|
|
|
555
555
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
556
556
|
|
|
557
557
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
558
|
-
|
|
|
558
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
559
|
+
|
|
560
|
+
| **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
|
|
561
|
+
| ------------------ | --------- | ----------- | ------------ |
|
|
559
562
|
|
|
560
|
-
| **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
|
|
561
|
-
| --- | --- | --- | --- |
|
|
562
563
|
|
|
563
|
-
|
|
564
564
|
|
|
565
565
|
### Secondary Rounded Button
|
|
566
566
|
|
|
@@ -571,10 +571,10 @@ Include an icon when needing to provide additional context to users of what acti
|
|
|
571
571
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
572
572
|
|
|
573
573
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
574
|
-
|
|
|
574
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
575
575
|
|
|
576
|
-
| **Default + Icon** |
|
|
577
|
-
|
|
|
576
|
+
| **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
|
|
577
|
+
| ------------------ | --------- | ----------- | ------------ |
|
|
578
578
|
|
|
579
579
|
### Error Rounded Button
|
|
580
580
|
|
|
@@ -584,11 +584,11 @@ Include an icon when needing to provide additional context to users of what acti
|
|
|
584
584
|
|
|
585
585
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
586
586
|
|
|
587
|
-
| **Default** |
|
|
588
|
-
|
|
|
587
|
+
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
588
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
589
589
|
|
|
590
|
-
| **Default + Icon** |
|
|
591
|
-
|
|
|
590
|
+
| **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
|
|
591
|
+
| ------------------ | --------- | ----------- | ------------ |
|
|
592
592
|
|
|
593
593
|
---
|
|
594
594
|
|
|
@@ -600,8 +600,8 @@ These rules establish how much margin should exist between and around elements.
|
|
|
600
600
|
|
|
601
601
|
## Square Button
|
|
602
602
|
|
|
603
|
-
|
|
|
604
|
-
| --- |
|
|
603
|
+
| | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
|
|
604
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
|
|
605
605
|
|
|
606
606
|
### Primary Square Button
|
|
607
607
|
|
|
@@ -612,10 +612,10 @@ Include an icon when needing to provide additional context to users of what acti
|
|
|
612
612
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
613
613
|
|
|
614
614
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
615
|
-
|
|
|
615
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
616
616
|
|
|
617
|
-
| **Default + Icon** | **Hover**
|
|
618
|
-
|
|
|
617
|
+
| **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
|
|
618
|
+
| ------------------ | --------- | ----------- | ------------ |
|
|
619
619
|
|
|
620
620
|
### Secondary Square Button
|
|
621
621
|
|
|
@@ -626,10 +626,10 @@ Include an icon when needing to provide additional context to users of what acti
|
|
|
626
626
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
627
627
|
|
|
628
628
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
629
|
-
|
|
|
629
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
630
630
|
|
|
631
|
-
| **Default + Icon** |
|
|
632
|
-
|
|
|
631
|
+
| **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
|
|
632
|
+
| ------------------ | --------- | ----------- | ------------ |
|
|
633
633
|
|
|
634
634
|
### Error Square Button
|
|
635
635
|
|
|
@@ -640,10 +640,10 @@ Include an icon when needing to provide additional context to users of what acti
|
|
|
640
640
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
641
641
|
|
|
642
642
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
643
|
-
|
|
|
643
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
644
644
|
|
|
645
645
|
| **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
|
|
646
|
-
|
|
|
646
|
+
| ------------------ | --------- | ----------- | ------------ |
|
|
647
647
|
|
|
648
648
|
---
|
|
649
649
|
|
|
@@ -655,8 +655,8 @@ These rules establish how much margin should exist between and around elements.
|
|
|
655
655
|
|
|
656
656
|
## Minimal Button
|
|
657
657
|
|
|
658
|
-
|
|
|
659
|
-
| --- |
|
|
658
|
+
| | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
|
|
659
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
|
|
660
660
|
|
|
661
661
|
### Primary Minimal Button
|
|
662
662
|
|
|
@@ -669,12 +669,12 @@ Include an icon when needing to provide additional context to users of what acti
|
|
|
669
669
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
670
670
|
|
|
671
671
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
672
|
-
|
|
|
672
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
673
|
+
|
|
674
|
+
| **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
|
|
675
|
+
| ------------------ | --------- | ----------- | ------------ |
|
|
673
676
|
|
|
674
|
-
| **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
|
|
675
|
-
| --- | --- | --- | --- |
|
|
676
677
|
|
|
677
|
-
|
|
678
678
|
|
|
679
679
|
### Secondary Minimal Button
|
|
680
680
|
|
|
@@ -685,9 +685,9 @@ Note: only Primary Minimal Buttons can be paired with icons.
|
|
|
685
685
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
686
686
|
|
|
687
687
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
688
|
-
|
|
|
688
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
689
|
+
|
|
689
690
|
|
|
690
|
-
|
|
691
691
|
|
|
692
692
|
---
|
|
693
693
|
|
|
@@ -699,8 +699,8 @@ These rules establish how much margin should exist between and around elements.
|
|
|
699
699
|
|
|
700
700
|
## Icon Button
|
|
701
701
|
|
|
702
|
-
|
|
|
703
|
-
| --- |
|
|
702
|
+
| | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
|
|
703
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
|
|
704
704
|
|
|
705
705
|
### Large Primary Icon Button
|
|
706
706
|
|
|
@@ -713,9 +713,9 @@ Icon Buttons can be coupled with a Dropdown Menu when there are multiple options
|
|
|
713
713
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
714
714
|
|
|
715
715
|
| **Default (Off)** | **Hover (Off)** | **Pressed** | **Default (On)** | **Hover (On)** | **Disabled** |
|
|
716
|
-
|
|
|
716
|
+
| ----------------- | --------------- | ----------- | ---------------- | -------------- | ------------ |
|
|
717
|
+
|
|
717
718
|
|
|
718
|
-
|
|
719
719
|
|
|
720
720
|
### Small Primary Icon Button
|
|
721
721
|
|
|
@@ -728,7 +728,7 @@ Icon Buttons can be coupled with a Dropdown Menu when there are multiple options
|
|
|
728
728
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
729
729
|
|
|
730
730
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
731
|
-
|
|
|
731
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
732
732
|
|
|
733
733
|
### Large Secondary Icon Button
|
|
734
734
|
|
|
@@ -741,7 +741,7 @@ Icon Buttons can be coupled with a Dropdown Menu when there are multiple options
|
|
|
741
741
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
742
742
|
|
|
743
743
|
| **Default (Off)** | **Hover (Off)** | **Default (On)** | **Hover (On)** | **Disabled** |
|
|
744
|
-
|
|
|
744
|
+
| ----------------- | --------------- | ---------------- | -------------- | ------------ |
|
|
745
745
|
|
|
746
746
|
### Small Secondary Icon Button
|
|
747
747
|
|
|
@@ -754,7 +754,7 @@ Icon Buttons can be coupled with a Dropdown Menu when there are multiple options
|
|
|
754
754
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
755
755
|
|
|
756
756
|
| **Default (Off)** | **Hover (Off)** | **Default (On)** | **Hover (On)** | **Disabled** |
|
|
757
|
-
|
|
|
757
|
+
| ----------------- | --------------- | ---------------- | -------------- | ------------ |
|
|
758
758
|
|
|
759
759
|
### Large Tertiary Icon Button
|
|
760
760
|
|
|
@@ -765,7 +765,7 @@ Use the Tertiary Icon Button size that is most appropriate for the design it is
|
|
|
765
765
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
766
766
|
|
|
767
767
|
| **Default** | **Hover** | **Pressed** |
|
|
768
|
-
|
|
|
768
|
+
| ----------- | --------- | ----------- |
|
|
769
769
|
|
|
770
770
|
### Medium Tertiary Icon Button
|
|
771
771
|
|
|
@@ -776,7 +776,7 @@ Use the Tertiary Icon Button size that is most appropriate for the design it is
|
|
|
776
776
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
777
777
|
|
|
778
778
|
| **Default** | **Hover** | **Pressed** |
|
|
779
|
-
|
|
|
779
|
+
| ----------- | --------- | ----------- |
|
|
780
780
|
|
|
781
781
|
### Small Tertiary Icon Button
|
|
782
782
|
|
|
@@ -787,7 +787,7 @@ Use the Tertiary Icon Button size that is most appropriate for the design it is
|
|
|
787
787
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
788
788
|
|
|
789
789
|
| **Default** | **Hover** | **Pressed** |
|
|
790
|
-
|
|
|
790
|
+
| ----------- | --------- | ----------- |
|
|
791
791
|
|
|
792
792
|
---
|
|
793
793
|
|
|
@@ -799,8 +799,8 @@ These rules establish how much margin should exist between and around elements.
|
|
|
799
799
|
|
|
800
800
|
## Rounded Dropdown Button
|
|
801
801
|
|
|
802
|
-
|
|
|
803
|
-
| --- |
|
|
802
|
+
| | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
|
|
803
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
|
|
804
804
|
|
|
805
805
|
### Primary Rounded Dropdown Button
|
|
806
806
|
|
|
@@ -813,9 +813,9 @@ The options are presented in a dropdown menu; use in conjunction with Dropdown M
|
|
|
813
813
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
814
814
|
|
|
815
815
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
816
|
-
|
|
|
816
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
817
|
+
|
|
817
818
|
|
|
818
|
-
|
|
819
819
|
|
|
820
820
|
### Secondary Rounded Dropdown Button
|
|
821
821
|
|
|
@@ -826,7 +826,7 @@ The options are presented in a dropdown menu; use in conjunction with Dropdown M
|
|
|
826
826
|
Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
|
|
827
827
|
|
|
828
828
|
| **Default** | **Hover** | **Pressed** | **Disabled** |
|
|
829
|
-
|
|
|
829
|
+
| ----------- | --------- | ----------- | ------------ |
|
|
830
830
|
|
|
831
831
|
---
|
|
832
832
|
|
|
@@ -838,8 +838,8 @@ These rules establish how much margin should exist between and around elements.
|
|
|
838
838
|
|
|
839
839
|
## Button Components
|
|
840
840
|
|
|
841
|
-
| Below you will find interactive Storybook iframes for each component within the Button element group.
|
|
842
|
-
|
|
|
841
|
+
| Below you will find interactive Storybook iframes for each component within the Button element group. Tabs within each iframe provide a different set of tools: The Controls tab allows you to see and adjust all available props. The Actions tab shows you data displayed by event handler arguments. | | **Jump to component:** Button ButtonIcon ButtonDropdown |
|
|
842
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------------------------- |
|
|
843
843
|
|
|
844
844
|
---
|
|
845
845
|
|
|
@@ -867,8 +867,8 @@ Buttons are one of the primary ways users interact with and provide input to the
|
|
|
867
867
|
|
|
868
868
|
## Button Components
|
|
869
869
|
|
|
870
|
-
| There are a range of Button types available to use depending on the amount of emphasis the Button needs to have, its location in the UI, and whether it is existing alone or alongside other Buttons. |
|
|
871
|
-
|
|
|
870
|
+
| There are a range of Button types available to use depending on the amount of emphasis the Button needs to have, its location in the UI, and whether it is existing alone or alongside other Buttons. | | **Jump to variant:** Button Dropdown Button Toggle Button |
|
|
871
|
+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | --------------------------------------------------------- |
|
|
872
872
|
|
|
873
873
|
### Visual Preview
|
|
874
874
|
|
|
@@ -876,8 +876,8 @@ Buttons are one of the primary ways users interact with and provide input to the
|
|
|
876
876
|
|
|
877
877
|
## Button
|
|
878
878
|
|
|
879
|
-
|
|
|
880
|
-
| --- |
|
|
879
|
+
| | In Figma | | | Meets Accessibility | | | In Code |
|
|
880
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
|
|
881
881
|
|
|
882
882
|
### Button Styles
|
|
883
883
|
|
|
@@ -903,15 +903,15 @@ Use for primary or emphasized actions.
|
|
|
903
903
|
|
|
904
904
|
Include an icon when needing to provide additional context to users of what action the Button has. Label text is available in all caps or title case; title case used by default.
|
|
905
905
|
|
|
906
|
-
|
|
906
|
+
_Title Case_
|
|
907
907
|
|
|
908
908
|
| Default | Hover | Pressed | Disabled |
|
|
909
|
-
|
|
|
909
|
+
| ------- | ----- | ------- | -------- |
|
|
910
910
|
|
|
911
|
-
|
|
911
|
+
_All Caps_
|
|
912
912
|
|
|
913
913
|
| Default | Hover | Pressed | Disabled |
|
|
914
|
-
|
|
|
914
|
+
| ------- | ----- | ------- | -------- |
|
|
915
915
|
|
|
916
916
|
#### Secondary
|
|
917
917
|
|
|
@@ -919,15 +919,15 @@ Use for a secondary or deemphasized action; often paired with a primary Button.
|
|
|
919
919
|
|
|
920
920
|
Include an icon when needing to provide additional context to users of what action the Button has. Label text is available in all caps or title case; title case used by default.
|
|
921
921
|
|
|
922
|
-
|
|
922
|
+
_Title Case_
|
|
923
923
|
|
|
924
924
|
| Default | Hover | Pressed | Disabled |
|
|
925
|
-
|
|
|
925
|
+
| ------- | ----- | ------- | -------- |
|
|
926
926
|
|
|
927
|
-
|
|
927
|
+
_All Caps_
|
|
928
928
|
|
|
929
929
|
| Default | Hover | Pressed | Disabled |
|
|
930
|
-
|
|
|
930
|
+
| ------- | ----- | ------- | -------- |
|
|
931
931
|
|
|
932
932
|
#### Destructive
|
|
933
933
|
|
|
@@ -935,15 +935,15 @@ Use the destructive Button when the outcome of the user clicking the button will
|
|
|
935
935
|
|
|
936
936
|
Include an icon when needing to provide additional context to users of what action the Button has. Label text is available in all caps or title case; title case used by default.
|
|
937
937
|
|
|
938
|
-
|
|
938
|
+
_Title Case_
|
|
939
939
|
|
|
940
940
|
| Default | Hover | Pressed | Disabled |
|
|
941
|
-
|
|
|
941
|
+
| ------- | ----- | ------- | -------- |
|
|
942
942
|
|
|
943
|
-
|
|
943
|
+
_All Caps_
|
|
944
944
|
|
|
945
945
|
| Default | Hover | Pressed | Disabled |
|
|
946
|
-
|
|
|
946
|
+
| ------- | ----- | ------- | -------- |
|
|
947
947
|
|
|
948
948
|
---
|
|
949
949
|
|
|
@@ -957,15 +957,15 @@ Alternate Button style for primary or emphasized actions.
|
|
|
957
957
|
|
|
958
958
|
Include an icon when needing to provide additional context to users of what action the Button has. Label text is available in all caps or title case; title case used by default.
|
|
959
959
|
|
|
960
|
-
|
|
960
|
+
_Title Case_
|
|
961
961
|
|
|
962
962
|
| Default | Hover | Pressed | Disabled |
|
|
963
|
-
|
|
|
963
|
+
| ------- | ----- | ------- | -------- |
|
|
964
964
|
|
|
965
|
-
|
|
965
|
+
_All Caps_
|
|
966
966
|
|
|
967
967
|
| Default | Hover | Pressed | Disabled |
|
|
968
|
-
|
|
|
968
|
+
| ------- | ----- | ------- | -------- |
|
|
969
969
|
|
|
970
970
|
#### **Secondary**
|
|
971
971
|
|
|
@@ -973,15 +973,15 @@ Use for a secondary or deemphasized action; often paired with a primary Button.
|
|
|
973
973
|
|
|
974
974
|
Include an icon when needing to provide additional context to users of what action the Button has. Label text is available in all caps or title case; title case used by default.
|
|
975
975
|
|
|
976
|
-
|
|
976
|
+
_Title Case_
|
|
977
977
|
|
|
978
978
|
| Default | Hover | Pressed | Disabled |
|
|
979
|
-
|
|
|
979
|
+
| ------- | ----- | ------- | -------- |
|
|
980
980
|
|
|
981
|
-
|
|
981
|
+
_All Caps_
|
|
982
982
|
|
|
983
983
|
| Default | Hover | Pressed | Disabled |
|
|
984
|
-
|
|
|
984
|
+
| ------- | ----- | ------- | -------- |
|
|
985
985
|
|
|
986
986
|
#### Destructive
|
|
987
987
|
|
|
@@ -989,15 +989,15 @@ Use the destructive Button when the outcome of the user clicking the button will
|
|
|
989
989
|
|
|
990
990
|
Include an icon when needing to provide additional context to users of what action the Button has. Label text is available in all caps or title case; title case used by default.
|
|
991
991
|
|
|
992
|
-
|
|
992
|
+
_Title Case_
|
|
993
993
|
|
|
994
994
|
| Default | Hover | Pressed | Disabled |
|
|
995
|
-
|
|
|
995
|
+
| ------- | ----- | ------- | -------- |
|
|
996
996
|
|
|
997
|
-
|
|
997
|
+
_All Caps_
|
|
998
998
|
|
|
999
999
|
| Default | Hover | Pressed | Disabled |
|
|
1000
|
-
|
|
|
1000
|
+
| ------- | ----- | ------- | -------- |
|
|
1001
1001
|
|
|
1002
1002
|
---
|
|
1003
1003
|
|
|
@@ -1013,15 +1013,15 @@ Use for primary or emphasized actions.
|
|
|
1013
1013
|
|
|
1014
1014
|
Include an icon when needing to provide additional context to users of what action the Button has. Label text is available in all caps or title case; all caps is used by default.
|
|
1015
1015
|
|
|
1016
|
-
|
|
1016
|
+
_Title Case_
|
|
1017
1017
|
|
|
1018
1018
|
| Default | Hover | Pressed | Disabled |
|
|
1019
|
-
|
|
|
1019
|
+
| ------- | ----- | ------- | -------- |
|
|
1020
1020
|
|
|
1021
|
-
|
|
1021
|
+
_All Caps_
|
|
1022
1022
|
|
|
1023
1023
|
| Default | Hover | Pressed | Disabled |
|
|
1024
|
-
|
|
|
1024
|
+
| ------- | ----- | ------- | -------- |
|
|
1025
1025
|
|
|
1026
1026
|
#### Secondary
|
|
1027
1027
|
|
|
@@ -1029,15 +1029,15 @@ Use for a secondary or deemphasized action; often paired with a primary Button.
|
|
|
1029
1029
|
|
|
1030
1030
|
Label text is available in all caps or title case; all caps is used by default.
|
|
1031
1031
|
|
|
1032
|
-
|
|
1032
|
+
_Title Case_
|
|
1033
1033
|
|
|
1034
1034
|
| Default | Hover | Pressed | Disabled |
|
|
1035
|
-
|
|
|
1035
|
+
| ------- | ----- | ------- | -------- |
|
|
1036
1036
|
|
|
1037
|
-
|
|
1037
|
+
_All Caps_
|
|
1038
1038
|
|
|
1039
1039
|
| Default | Hover | Pressed | Disabled |
|
|
1040
|
-
|
|
|
1040
|
+
| ------- | ----- | ------- | -------- |
|
|
1041
1041
|
|
|
1042
1042
|
---
|
|
1043
1043
|
|
|
@@ -1051,58 +1051,58 @@ Optionally, pair Button – Icon with a Tooltip to use as a label to communicate
|
|
|
1051
1051
|
|
|
1052
1052
|
Primary Button – Icon should be used in places that require the user's primary attention or to emphasize a primary action. Can be paired with other Button components.
|
|
1053
1053
|
|
|
1054
|
-
|
|
1054
|
+
_Large_
|
|
1055
1055
|
|
|
1056
1056
|
| Default | Hover | Pressed | Disabled |
|
|
1057
|
-
|
|
|
1057
|
+
| ------- | ----- | ------- | -------- |
|
|
1058
1058
|
|
|
1059
|
-
|
|
1059
|
+
_Medium_
|
|
1060
1060
|
|
|
1061
1061
|
| Default | Hover | Pressed | Disabled |
|
|
1062
|
-
|
|
|
1062
|
+
| ------- | ----- | ------- | -------- |
|
|
1063
1063
|
|
|
1064
|
-
|
|
1064
|
+
_Small_
|
|
1065
1065
|
|
|
1066
1066
|
| Default | Hover | Pressed | Disabled |
|
|
1067
|
-
|
|
|
1067
|
+
| ------- | ----- | ------- | -------- |
|
|
1068
1068
|
|
|
1069
1069
|
#### Secondary
|
|
1070
1070
|
|
|
1071
1071
|
Secondary Button – Icon should be used for deemphasized or secondary actions. Can be paired with other Button components.
|
|
1072
1072
|
|
|
1073
|
-
|
|
1073
|
+
_Large_
|
|
1074
1074
|
|
|
1075
1075
|
| Default | Hover | Pressed | Disabled |
|
|
1076
|
-
|
|
|
1076
|
+
| ------- | ----- | ------- | -------- |
|
|
1077
1077
|
|
|
1078
|
-
|
|
1078
|
+
_Medium_
|
|
1079
1079
|
|
|
1080
1080
|
| Default | Hover | Pressed | Disabled |
|
|
1081
|
-
|
|
|
1081
|
+
| ------- | ----- | ------- | -------- |
|
|
1082
1082
|
|
|
1083
|
-
|
|
1083
|
+
_Small_
|
|
1084
1084
|
|
|
1085
1085
|
| Default | Hover | Pressed | Disabled |
|
|
1086
|
-
|
|
|
1086
|
+
| ------- | ----- | ------- | -------- |
|
|
1087
1087
|
|
|
1088
1088
|
#### Tertiary
|
|
1089
1089
|
|
|
1090
1090
|
The tertiary Icon Button should be used for lowest level actions that are not a part of the user's main workflow, such as closing a Dialog or expanding an Accordion. It is not usually used in combination with other Buttons or Tooltips.
|
|
1091
1091
|
|
|
1092
|
-
|
|
1092
|
+
_Large_
|
|
1093
1093
|
|
|
1094
1094
|
| Default | Hover | Pressed | Disabled |
|
|
1095
|
-
|
|
|
1095
|
+
| ------- | ----- | ------- | -------- |
|
|
1096
1096
|
|
|
1097
|
-
|
|
1097
|
+
_Medium_
|
|
1098
1098
|
|
|
1099
1099
|
| Default | Hover | Pressed | Disabled |
|
|
1100
|
-
|
|
|
1100
|
+
| ------- | ----- | ------- | -------- |
|
|
1101
1101
|
|
|
1102
|
-
|
|
1102
|
+
_Small_
|
|
1103
1103
|
|
|
1104
1104
|
| Default | Hover | Pressed | Disabled |
|
|
1105
|
-
|
|
|
1105
|
+
| ------- | ----- | ------- | -------- |
|
|
1106
1106
|
|
|
1107
1107
|
---
|
|
1108
1108
|
|
|
@@ -1114,8 +1114,8 @@ These rules establish how much margin should exist between and around elements.
|
|
|
1114
1114
|
|
|
1115
1115
|
## Dropdown Button
|
|
1116
1116
|
|
|
1117
|
-
|
|
|
1118
|
-
| --- |
|
|
1117
|
+
| | In Figma | | | Meets Accessibility | | | In Code |
|
|
1118
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
|
|
1119
1119
|
|
|
1120
1120
|
### Dropdown Button Styles
|
|
1121
1121
|
|
|
@@ -1140,14 +1140,14 @@ Use when there is a need to present the user with multiple options for actions t
|
|
|
1140
1140
|
The Primary variant should be used in places that require the user's primary attention or to emphasize a primary action.
|
|
1141
1141
|
|
|
1142
1142
|
| Default | Hover | Pressed | Disabled |
|
|
1143
|
-
|
|
|
1143
|
+
| ------- | ----- | ------- | -------- |
|
|
1144
1144
|
|
|
1145
1145
|
#### Secondary
|
|
1146
1146
|
|
|
1147
1147
|
The Secondary Rounded Dropdown Button should be used for deemphasized or secondary actions.
|
|
1148
1148
|
|
|
1149
1149
|
| Default | Hover | Pressed | Disabled |
|
|
1150
|
-
|
|
|
1150
|
+
| ------- | ----- | ------- | -------- |
|
|
1151
1151
|
|
|
1152
1152
|
---
|
|
1153
1153
|
|
|
@@ -1160,14 +1160,14 @@ Alternate Dropdown Button style for use when there is a need to present the user
|
|
|
1160
1160
|
The Primary variant should be used in places that require the user's primary attention or to emphasize a primary action.
|
|
1161
1161
|
|
|
1162
1162
|
| Default | Hover | Pressed | Disabled |
|
|
1163
|
-
|
|
|
1163
|
+
| ------- | ----- | ------- | -------- |
|
|
1164
1164
|
|
|
1165
1165
|
#### Secondary
|
|
1166
1166
|
|
|
1167
1167
|
The Secondary Rounded Dropdown Button should be used for deemphasized or secondary actions.
|
|
1168
1168
|
|
|
1169
1169
|
| Default | Hover | Pressed | Disabled |
|
|
1170
|
-
|
|
|
1170
|
+
| ------- | ----- | ------- | -------- |
|
|
1171
1171
|
|
|
1172
1172
|
---
|
|
1173
1173
|
|
|
@@ -1181,39 +1181,39 @@ Optionally, pair Dropdown Button – Icon with a Tooltip to use as a label to co
|
|
|
1181
1181
|
|
|
1182
1182
|
Primary Dropdown Button – Icon should be used in places that require the user's primary attention or to emphasize a primary action. Can be paired with other Button components.
|
|
1183
1183
|
|
|
1184
|
-
|
|
1184
|
+
_Large_
|
|
1185
1185
|
|
|
1186
1186
|
| Default | Hover | Pressed | Disabled |
|
|
1187
|
-
|
|
|
1187
|
+
| ------- | ----- | ------- | -------- |
|
|
1188
1188
|
|
|
1189
|
-
|
|
1189
|
+
_Medium_
|
|
1190
1190
|
|
|
1191
1191
|
| Default | Hover | Pressed | Disabled |
|
|
1192
|
-
|
|
|
1192
|
+
| ------- | ----- | ------- | -------- |
|
|
1193
1193
|
|
|
1194
|
-
|
|
1194
|
+
_Small_
|
|
1195
1195
|
|
|
1196
1196
|
| Default | Hover | Pressed | Disabled |
|
|
1197
|
-
|
|
|
1197
|
+
| ------- | ----- | ------- | -------- |
|
|
1198
1198
|
|
|
1199
1199
|
#### Secondary
|
|
1200
1200
|
|
|
1201
1201
|
Secondary Dropdown Button – Icon should be used for deemphasized or secondary actions. Can be paired with other Button components.
|
|
1202
1202
|
|
|
1203
|
-
|
|
1203
|
+
_Large_
|
|
1204
1204
|
|
|
1205
1205
|
| Default | Hover | Pressed | Disabled |
|
|
1206
|
-
|
|
|
1206
|
+
| ------- | ----- | ------- | -------- |
|
|
1207
1207
|
|
|
1208
|
-
|
|
1208
|
+
_Medium_
|
|
1209
1209
|
|
|
1210
1210
|
| Default | Hover | Pressed | Disabled |
|
|
1211
|
-
|
|
|
1211
|
+
| ------- | ----- | ------- | -------- |
|
|
1212
1212
|
|
|
1213
|
-
|
|
1213
|
+
_Small_
|
|
1214
1214
|
|
|
1215
1215
|
| Default | Hover | Pressed | Disabled |
|
|
1216
|
-
|
|
|
1216
|
+
| ------- | ----- | ------- | -------- |
|
|
1217
1217
|
|
|
1218
1218
|
---
|
|
1219
1219
|
|
|
@@ -1225,8 +1225,8 @@ These rules establish how much margin should exist between and around elements.
|
|
|
1225
1225
|
|
|
1226
1226
|
## Toggle Button
|
|
1227
1227
|
|
|
1228
|
-
|
|
|
1229
|
-
| --- |
|
|
1228
|
+
| | In Figma | | | Meets Accessibility | | | In Code |
|
|
1229
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
|
|
1230
1230
|
|
|
1231
1231
|
### Live Instance
|
|
1232
1232
|
|
|
@@ -1246,39 +1246,39 @@ Optionally, pair Toggle Button with a Tooltip to use as a label to communicate t
|
|
|
1246
1246
|
|
|
1247
1247
|
Toggle Button – Primary should be used in places that require the user's primary attention or to emphasize a primary action. Can be paired with other Button components.
|
|
1248
1248
|
|
|
1249
|
-
|
|
1249
|
+
_Large_
|
|
1250
1250
|
|
|
1251
1251
|
| Default (Off) | Hover (Off) | Pressed (On) | Default (On) | Hover (On) | Pressed (Off) | Disabled |
|
|
1252
|
-
|
|
|
1252
|
+
| :-----------: | :---------: | :----------: | :----------: | :--------: | :-----------: | :------: |
|
|
1253
1253
|
|
|
1254
|
-
|
|
1254
|
+
_Medium_
|
|
1255
1255
|
|
|
1256
1256
|
| Default (Off) | Hover (Off) | Pressed (On) | Default (On) | Hover (On) | Pressed (Off) | Disabled |
|
|
1257
|
-
|
|
|
1257
|
+
| :-----------: | :---------: | :----------: | :----------: | :--------: | :-----------: | :------: |
|
|
1258
1258
|
|
|
1259
|
-
|
|
1259
|
+
_Small_
|
|
1260
1260
|
|
|
1261
1261
|
| Default (Off) | Hover (Off) | Pressed (On) | Default (On) | Hover (On) | Pressed (Off) | Disabled |
|
|
1262
|
-
|
|
|
1262
|
+
| :-----------: | :---------: | :----------: | :----------: | :--------: | :-----------: | :------: |
|
|
1263
1263
|
|
|
1264
1264
|
#### Secondary
|
|
1265
1265
|
|
|
1266
1266
|
Toggle Button – Secondary should be used for deemphasized or secondary actions. Can be paired with other Button components.
|
|
1267
1267
|
|
|
1268
|
-
|
|
1268
|
+
_Large_
|
|
1269
1269
|
|
|
1270
1270
|
| Default (Off) | Hover (Off) | Pressed (On) | Default (On) | Hover (On) | Pressed (Off) | Disabled |
|
|
1271
|
-
|
|
|
1271
|
+
| :-----------: | :---------: | :----------: | :----------: | :--------: | :-----------: | :------: |
|
|
1272
1272
|
|
|
1273
|
-
|
|
1273
|
+
_Medium_
|
|
1274
1274
|
|
|
1275
1275
|
| Default (Off) | Hover (Off) | Pressed (On) | Default (On) | Hover (On) | Pressed (Off) | Disabled |
|
|
1276
|
-
|
|
|
1276
|
+
| :-----------: | :---------: | :----------: | :----------: | :--------: | :-----------: | :------: |
|
|
1277
1277
|
|
|
1278
|
-
|
|
1278
|
+
_Small_
|
|
1279
1279
|
|
|
1280
1280
|
| Default (Off) | Hover (Off) | Pressed (On) | Default (On) | Hover (On) | Pressed (Off) | Disabled |
|
|
1281
|
-
|
|
|
1281
|
+
| :-----------: | :---------: | :----------: | :----------: | :--------: | :-----------: | :------: |
|
|
1282
1282
|
|
|
1283
1283
|
---
|
|
1284
1284
|
|
|
@@ -1290,12 +1290,12 @@ These rules establish how much margin should exist between and around elements.
|
|
|
1290
1290
|
|
|
1291
1291
|
## Button Components
|
|
1292
1292
|
|
|
1293
|
-
| There are a range of Button types available to use depending on the amount of emphasis the button needs to have, its location in the UI, and whether it is existing alone or alongside other Buttons. |
|
|
1294
|
-
|
|
|
1293
|
+
| There are a range of Button types available to use depending on the amount of emphasis the button needs to have, its location in the UI, and whether it is existing alone or alongside other Buttons. | | **Jump to component:** Button ButtonDropdown ButtonToggle |
|
|
1294
|
+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | --------------------------------------------------------- |
|
|
1295
1295
|
|
|
1296
1296
|
### Visual Preview
|
|
1297
1297
|
|
|
1298
|
-
|
|
1298
|
+
> **Note:** The code examples below must install dependencies before displaying and may take extra time to load
|
|
1299
1299
|
|
|
1300
1300
|
---
|
|
1301
1301
|
|
|
@@ -1309,21 +1309,21 @@ The component's source code in the SDS codebase can be found here.
|
|
|
1309
1309
|
|
|
1310
1310
|
The following props are available to MUI's `Button` component, but produce no effect (or unexpected effects) for SDS's `Button` component, so **it is recommended to not use them**:
|
|
1311
1311
|
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1312
|
+
- **`variant`\*\***:\*\* This prop is intended to set the `Button` to either `text` only, `contained`, or `outlined`. With SDS's `Button`, they do not function as described in the MUI documentation; however, similar effects, specific to SDS's styles, can be achieved through a combination of the SDS-only props: `sdsStyle` and `sdsType` (see details below).
|
|
1313
|
+
- **`color`\*\***:\*\* SDS'S`Button`does not support this colors or intents that would be expected through this prop. However, the `sdsType` prop can be used to set the button color as `primary` or `secondary`.
|
|
1314
|
+
- **`size`\*\***:\*\* This prop is not supported for SDS's `Button`
|
|
1315
|
+
- **`disableElevation`\*\***:\*\* The SDS `Button` component doesn't have a visual "elevation" or shadowed treatment by default (which this prop disables for MUI's `Button`). Setting `disableElevation={false}` will not render the MUI default elevation treatment.
|
|
1316
1316
|
|
|
1317
1317
|
Icons can be used in both MUI and SDS `Button` component, but are called in slightly different ways:
|
|
1318
1318
|
|
|
1319
|
-
|
|
1319
|
+
- **`startIcon`** and **`endIcon`\*\***:\*\* Both of these props are supported by both MUI and SDS's `Buttons`. However, MUI expects the prop to receive an individual icon as its own component (for example`startIcon={<DeleteIcon />}`), whereas SDS takes the `Icon` component which references which specific icon to call, as one of its props, as such:
|
|
1320
1320
|
|
|
1321
|
-
|
|
1321
|
+
`startIcon={<Icon sdsIcon="download" sdsSize="s" sdsType="button" />}`
|
|
1322
1322
|
|
|
1323
1323
|
SDS's `Button` has additional props to allow flexibility while maintaining the SDS styles:
|
|
1324
1324
|
|
|
1325
|
-
|
|
1326
|
-
|
|
1325
|
+
- **`sdsStyle`\*\***:\*\* takes `minimal` (default), `rounded`, or `square` or `icon` as values
|
|
1326
|
+
- **`sdsType`\*\***:\*\* takes `primary` (default, filled) or `secondary` (outlined) as values
|
|
1327
1327
|
|
|
1328
1328
|
### MUI Documentation
|
|
1329
1329
|
|
|
@@ -1335,29 +1335,29 @@ Any custom SDS props and MUI props required for implementation are found on the
|
|
|
1335
1335
|
|
|
1336
1336
|
If `sdsStyle` is set to either `rounded` or `squared`, the props are as follows:
|
|
1337
1337
|
|
|
1338
|
-
| Name
|
|
1339
|
-
|
|
|
1340
|
-
| `isAllCaps` | `bool`
|
|
1341
|
-
| `sdsStyle`
|
|
1342
|
-
| `sdsType`
|
|
1338
|
+
| Name | Type | Default | Description |
|
|
1339
|
+
| ----------- | ------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------- |
|
|
1340
|
+
| `isAllCaps` | `bool` | `false` | When set to `true`, the button text will be displayed in all capital letters. Please note that the `isAllCaps` attribute only applies to buttons with the `sdsStyle` set to `minimal`. |
|
|
1341
|
+
| `sdsStyle` | `"rounded" | "square"` | `-` | Style of the button. |
|
|
1342
|
+
| `sdsType` | `"primary"` ` | "secondary"` ` | "destructive"` | `-` | Type of the button. |
|
|
1343
1343
|
|
|
1344
1344
|
If `sdsStyle` is set to `minimal`, the props are listed below:
|
|
1345
1345
|
|
|
1346
|
-
| Name
|
|
1347
|
-
|
|
|
1348
|
-
| `isAllCaps` | `bool`
|
|
1349
|
-
| `sdsStyle`
|
|
1350
|
-
| `sdsType`
|
|
1346
|
+
| Name | Type | Default | Description |
|
|
1347
|
+
| ----------- | ------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- |
|
|
1348
|
+
| `isAllCaps` | `bool` | `false` | When set to `true`, the button text will be displayed in all capital letters. Please note that the `isAllCaps` attribute only applies to buttons with the `sdsStyle` set to `minimal`. |
|
|
1349
|
+
| `sdsStyle` | `"minimal"` | `-` | Style of the button. |
|
|
1350
|
+
| `sdsType` | `"primary"` ` | "secondary"` | `-` | Type of the button. |
|
|
1351
1351
|
|
|
1352
1352
|
And if the `sdsStyle` is set to `icon`, the props are listed below:
|
|
1353
1353
|
|
|
1354
|
-
| Name
|
|
1355
|
-
|
|
|
1356
|
-
| `sdsSize`
|
|
1357
|
-
| `sdsStyle`
|
|
1358
|
-
| `sdsType`
|
|
1359
|
-
| `icon`
|
|
1360
|
-
| `sdsIconProps` | `Partial<IconProps>` | `-`
|
|
1354
|
+
| Name | Type | Default | Description |
|
|
1355
|
+
| -------------- | -------------------- | ----------------------------------- | ------------------------------------------ | --------------- | --------------------------------------- |
|
|
1356
|
+
| `sdsSize` | `"small"` ` | "medium"` ` | "large"` | `medium` | Determines the size of the button icon. |
|
|
1357
|
+
| `sdsStyle` | `"icon"` | `-` | Style of the button. |
|
|
1358
|
+
| `sdsType` | `"primary"` ` | "secondary"` ` | "tertiary"` | `-` | Type of the button icon. |
|
|
1359
|
+
| `icon` | `SDSIcon | React.ReactElement<CustomSVGProps>` | `-` | The actual icon |
|
|
1360
|
+
| `sdsIconProps` | `Partial<IconProps>` | `-` | Props for the icon if an sds icon is used. |
|
|
1361
1361
|
|
|
1362
1362
|
### Code examples
|
|
1363
1363
|
|
|
@@ -1390,13 +1390,11 @@ h1 {
|
|
|
1390
1390
|
|
|
1391
1391
|
```json
|
|
1392
1392
|
{
|
|
1393
|
-
"include": [
|
|
1394
|
-
"./**/*"
|
|
1395
|
-
],
|
|
1393
|
+
"include": ["./**/*"],
|
|
1396
1394
|
"compilerOptions": {
|
|
1397
1395
|
"strict": true,
|
|
1398
1396
|
"esModuleInterop": true,
|
|
1399
|
-
"lib": [
|
|
1397
|
+
"lib": ["dom", "es2015"],
|
|
1400
1398
|
"jsx": "react-jsx"
|
|
1401
1399
|
}
|
|
1402
1400
|
}
|
|
@@ -1411,7 +1409,9 @@ import "./styles.css";
|
|
|
1411
1409
|
function App() {
|
|
1412
1410
|
return (
|
|
1413
1411
|
<div className="app">
|
|
1414
|
-
<Button sdsType="primary" sdsStyle="square">
|
|
1412
|
+
<Button sdsType="primary" sdsStyle="square">
|
|
1413
|
+
Label
|
|
1414
|
+
</Button>
|
|
1415
1415
|
</div>
|
|
1416
1416
|
);
|
|
1417
1417
|
}
|
|
@@ -1456,13 +1456,12 @@ root.render(
|
|
|
1456
1456
|
<RootApp />
|
|
1457
1457
|
</React.StrictMode>
|
|
1458
1458
|
);
|
|
1459
|
-
|
|
1460
1459
|
```
|
|
1461
1460
|
|
|
1462
1461
|
**/public/index.html**
|
|
1463
1462
|
|
|
1464
1463
|
```html
|
|
1465
|
-
<!
|
|
1464
|
+
<!doctype html>
|
|
1466
1465
|
<html lang="en">
|
|
1467
1466
|
<head>
|
|
1468
1467
|
<meta charset="UTF-8" />
|
|
@@ -1483,13 +1482,24 @@ root.render(
|
|
|
1483
1482
|
<div id="root"></div>
|
|
1484
1483
|
</body>
|
|
1485
1484
|
</html>
|
|
1486
|
-
|
|
1487
1485
|
```
|
|
1488
1486
|
|
|
1489
1487
|
**/package.json**
|
|
1490
1488
|
|
|
1491
1489
|
```json
|
|
1492
|
-
{
|
|
1490
|
+
{
|
|
1491
|
+
"dependencies": {
|
|
1492
|
+
"react": "^18.0.0",
|
|
1493
|
+
"react-dom": "^18.0.0",
|
|
1494
|
+
"react-scripts": "^4.0.0"
|
|
1495
|
+
},
|
|
1496
|
+
"devDependencies": {
|
|
1497
|
+
"@types/react": "^18.0.0",
|
|
1498
|
+
"@types/react-dom": "^18.0.0",
|
|
1499
|
+
"typescript": "^4.0.0"
|
|
1500
|
+
},
|
|
1501
|
+
"main": "/index.tsx"
|
|
1502
|
+
}
|
|
1493
1503
|
```
|
|
1494
1504
|
|
|
1495
1505
|
---
|
|
@@ -1523,13 +1533,11 @@ h1 {
|
|
|
1523
1533
|
|
|
1524
1534
|
```json
|
|
1525
1535
|
{
|
|
1526
|
-
"include": [
|
|
1527
|
-
"./**/*"
|
|
1528
|
-
],
|
|
1536
|
+
"include": ["./**/*"],
|
|
1529
1537
|
"compilerOptions": {
|
|
1530
1538
|
"strict": true,
|
|
1531
1539
|
"esModuleInterop": true,
|
|
1532
|
-
"lib": [
|
|
1540
|
+
"lib": ["dom", "es2015"],
|
|
1533
1541
|
"jsx": "react-jsx"
|
|
1534
1542
|
}
|
|
1535
1543
|
}
|
|
@@ -1544,9 +1552,9 @@ import "./styles.css";
|
|
|
1544
1552
|
function App() {
|
|
1545
1553
|
return (
|
|
1546
1554
|
<div className="app">
|
|
1547
|
-
<Button
|
|
1548
|
-
sdsType="secondary"
|
|
1549
|
-
sdsStyle="square"
|
|
1555
|
+
<Button
|
|
1556
|
+
sdsType="secondary"
|
|
1557
|
+
sdsStyle="square"
|
|
1550
1558
|
startIcon={<Icon sdsIcon="Download" sdsSize="s" sdsType="button" />}
|
|
1551
1559
|
>
|
|
1552
1560
|
Download
|
|
@@ -1595,13 +1603,12 @@ root.render(
|
|
|
1595
1603
|
<RootApp />
|
|
1596
1604
|
</React.StrictMode>
|
|
1597
1605
|
);
|
|
1598
|
-
|
|
1599
1606
|
```
|
|
1600
1607
|
|
|
1601
1608
|
**/public/index.html**
|
|
1602
1609
|
|
|
1603
1610
|
```html
|
|
1604
|
-
<!
|
|
1611
|
+
<!doctype html>
|
|
1605
1612
|
<html lang="en">
|
|
1606
1613
|
<head>
|
|
1607
1614
|
<meta charset="UTF-8" />
|
|
@@ -1622,13 +1629,24 @@ root.render(
|
|
|
1622
1629
|
<div id="root"></div>
|
|
1623
1630
|
</body>
|
|
1624
1631
|
</html>
|
|
1625
|
-
|
|
1626
1632
|
```
|
|
1627
1633
|
|
|
1628
1634
|
**/package.json**
|
|
1629
1635
|
|
|
1630
1636
|
```json
|
|
1631
|
-
{
|
|
1637
|
+
{
|
|
1638
|
+
"dependencies": {
|
|
1639
|
+
"react": "^18.0.0",
|
|
1640
|
+
"react-dom": "^18.0.0",
|
|
1641
|
+
"react-scripts": "^4.0.0"
|
|
1642
|
+
},
|
|
1643
|
+
"devDependencies": {
|
|
1644
|
+
"@types/react": "^18.0.0",
|
|
1645
|
+
"@types/react-dom": "^18.0.0",
|
|
1646
|
+
"typescript": "^4.0.0"
|
|
1647
|
+
},
|
|
1648
|
+
"main": "/index.tsx"
|
|
1649
|
+
}
|
|
1632
1650
|
```
|
|
1633
1651
|
|
|
1634
1652
|
---
|
|
@@ -1662,13 +1680,11 @@ h1 {
|
|
|
1662
1680
|
|
|
1663
1681
|
```json
|
|
1664
1682
|
{
|
|
1665
|
-
"include": [
|
|
1666
|
-
"./**/*"
|
|
1667
|
-
],
|
|
1683
|
+
"include": ["./**/*"],
|
|
1668
1684
|
"compilerOptions": {
|
|
1669
1685
|
"strict": true,
|
|
1670
1686
|
"esModuleInterop": true,
|
|
1671
|
-
"lib": [
|
|
1687
|
+
"lib": ["dom", "es2015"],
|
|
1672
1688
|
"jsx": "react-jsx"
|
|
1673
1689
|
}
|
|
1674
1690
|
}
|
|
@@ -1683,11 +1699,7 @@ import "./styles.css";
|
|
|
1683
1699
|
function App() {
|
|
1684
1700
|
return (
|
|
1685
1701
|
<div className="app">
|
|
1686
|
-
<Button
|
|
1687
|
-
sdsType="primary"
|
|
1688
|
-
sdsStyle="icon"
|
|
1689
|
-
icon="Download"
|
|
1690
|
-
/>
|
|
1702
|
+
<Button sdsType="primary" sdsStyle="icon" icon="Download" />
|
|
1691
1703
|
</div>
|
|
1692
1704
|
);
|
|
1693
1705
|
}
|
|
@@ -1732,13 +1744,12 @@ root.render(
|
|
|
1732
1744
|
<RootApp />
|
|
1733
1745
|
</React.StrictMode>
|
|
1734
1746
|
);
|
|
1735
|
-
|
|
1736
1747
|
```
|
|
1737
1748
|
|
|
1738
1749
|
**/public/index.html**
|
|
1739
1750
|
|
|
1740
1751
|
```html
|
|
1741
|
-
<!
|
|
1752
|
+
<!doctype html>
|
|
1742
1753
|
<html lang="en">
|
|
1743
1754
|
<head>
|
|
1744
1755
|
<meta charset="UTF-8" />
|
|
@@ -1759,13 +1770,24 @@ root.render(
|
|
|
1759
1770
|
<div id="root"></div>
|
|
1760
1771
|
</body>
|
|
1761
1772
|
</html>
|
|
1762
|
-
|
|
1763
1773
|
```
|
|
1764
1774
|
|
|
1765
1775
|
**/package.json**
|
|
1766
1776
|
|
|
1767
1777
|
```json
|
|
1768
|
-
{
|
|
1778
|
+
{
|
|
1779
|
+
"dependencies": {
|
|
1780
|
+
"react": "^18.0.0",
|
|
1781
|
+
"react-dom": "^18.0.0",
|
|
1782
|
+
"react-scripts": "^4.0.0"
|
|
1783
|
+
},
|
|
1784
|
+
"devDependencies": {
|
|
1785
|
+
"@types/react": "^18.0.0",
|
|
1786
|
+
"@types/react-dom": "^18.0.0",
|
|
1787
|
+
"typescript": "^4.0.0"
|
|
1788
|
+
},
|
|
1789
|
+
"main": "/index.tsx"
|
|
1790
|
+
}
|
|
1769
1791
|
```
|
|
1770
1792
|
|
|
1771
1793
|
---
|
|
@@ -1780,23 +1802,23 @@ The component's source code in the SDS codebase can be found here.
|
|
|
1780
1802
|
|
|
1781
1803
|
### SDS vs MUI
|
|
1782
1804
|
|
|
1783
|
-
The SDS `ButtonDropdown` component is just the regular `Button` component, with the `chevronDown` icon added at the end of the button after the label text, via the MUI `endIcon` prop. Additionally, `ButtonDropdown` requires a `startIcon`.
|
|
1805
|
+
The SDS `ButtonDropdown` component is just the regular `Button` component, with the `chevronDown` icon added at the end of the button after the label text, via the MUI `endIcon` prop. Additionally, `ButtonDropdown` requires a `startIcon`. In SDS, both the `endIcon` and `startIcon` props take the `Icon` component, which references the specific icon to call as one of its props, like so:
|
|
1784
1806
|
|
|
1785
|
-
|
|
1807
|
+
`startIcon={<Icon sdsIcon="download" sdsSize="s" sdsType="button" />}`
|
|
1786
1808
|
|
|
1787
1809
|
whereas MUI expects the prop to receive an individual icon as its own component (for example`startIcon={<DeleteIcon />}`).
|
|
1788
1810
|
|
|
1789
1811
|
Since `ButtonIcon` is very similar to SDS's `Button` component, similar caveats apply in terms of the MUI props. The following props are available to MUI's `Button` component, but produce no effect (or unexpected effects) for SDS's `ButtonIcon` component, so it is recommended to not use them:
|
|
1790
1812
|
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1813
|
+
- **`variant`\*\***:\*\* This prop is intended to set the `Button` to either `text` only, `contained`, or `outlined`. With SDS's `ButtonIcon`, however, they do not function as described in the MUI documentation; however, similar effects, specific to SDS's styles, can be achieved through a combination of the SDS-only `sdsStyle` and `sdsType` props (see below).
|
|
1814
|
+
- **`color`\*\***:\*\* This prop doesn't work as expected for SDS's `ButtonIcon`, which doesn't support colors or intents. The `sdsType` prop can be used to set the button as `primary` or `secondary`, though.
|
|
1815
|
+
- **`size`\*\***:\*\* This prop is not supported for SDS's `ButtonIcon`
|
|
1816
|
+
- **`disableElevation`\*\***:\*\* The SDS `ButtonIcon` component doesn't have a visual "elevation" or shadowed treatment by default (which this prop disables for MUI's `Button`). However, setting `disableElevation={false}` will not render the MUI default elevation treatment.
|
|
1795
1817
|
|
|
1796
1818
|
SDS's `ButtonIcon` has additional props to allow flexibility while maintaining the SDS styles:
|
|
1797
1819
|
|
|
1798
|
-
|
|
1799
|
-
|
|
1820
|
+
- **`sdsStyle`\*\***:\*\* takes `minimal` (default), `rounded`, or `square` as values
|
|
1821
|
+
- **`sdsType`\*\***:\*\* takes `primary` (default, filled) or `secondary` (outlined) as values
|
|
1800
1822
|
|
|
1801
1823
|
### MUI Documentation
|
|
1802
1824
|
|
|
@@ -1806,19 +1828,19 @@ Documentation for the underlying MUI component can be found here.
|
|
|
1806
1828
|
|
|
1807
1829
|
Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
|
|
1808
1830
|
|
|
1809
|
-
| Name
|
|
1810
|
-
|
|
|
1811
|
-
| `icon`
|
|
1812
|
-
| `sdsStyle`
|
|
1813
|
-
| `sdsType`
|
|
1814
|
-
| `sdsSize`
|
|
1815
|
-
| `sdsIconProps` | `Partial<IconProps>` | `-`
|
|
1831
|
+
| Name | Type | Default | Description |
|
|
1832
|
+
| -------------- | -------------------- | ----------------------------------- | ------------------------------------------ | --------------------------------------------- | -------------------- |
|
|
1833
|
+
| `icon` | `SDSIcon | React.ReactElement<CustomSVGProps>` | `-` | An `icon` element placed before the children. |
|
|
1834
|
+
| `sdsStyle` | `"icon"` ` | "rounded"` ` | "square"` | `-` | Style of the button. |
|
|
1835
|
+
| `sdsType` | `"primary" | "secondary"` | `-` | Type of the button. |
|
|
1836
|
+
| `sdsSize` | `"small" | "medium" | "large"` | `"medium"` | Size of the icon. |
|
|
1837
|
+
| `sdsIconProps` | `Partial<IconProps>` | `-` | Props for the icon if an SDS icon is used. |
|
|
1816
1838
|
|
|
1817
1839
|
### Code examples
|
|
1818
1840
|
|
|
1819
1841
|
#### **Default ButtonDropdown**
|
|
1820
1842
|
|
|
1821
|
-
This example has the minimum props needed for the `ButtonDropdown` component.
|
|
1843
|
+
This example has the minimum props needed for the `ButtonDropdown` component.
|
|
1822
1844
|
|
|
1823
1845
|
**/styles.css**
|
|
1824
1846
|
|
|
@@ -1845,13 +1867,11 @@ h1 {
|
|
|
1845
1867
|
|
|
1846
1868
|
```json
|
|
1847
1869
|
{
|
|
1848
|
-
"include": [
|
|
1849
|
-
"./**/*"
|
|
1850
|
-
],
|
|
1870
|
+
"include": ["./**/*"],
|
|
1851
1871
|
"compilerOptions": {
|
|
1852
1872
|
"strict": true,
|
|
1853
1873
|
"esModuleInterop": true,
|
|
1854
|
-
"lib": [
|
|
1874
|
+
"lib": ["dom", "es2015"],
|
|
1855
1875
|
"jsx": "react-jsx"
|
|
1856
1876
|
}
|
|
1857
1877
|
}
|
|
@@ -1913,13 +1933,12 @@ root.render(
|
|
|
1913
1933
|
<RootApp />
|
|
1914
1934
|
</React.StrictMode>
|
|
1915
1935
|
);
|
|
1916
|
-
|
|
1917
1936
|
```
|
|
1918
1937
|
|
|
1919
1938
|
**/public/index.html**
|
|
1920
1939
|
|
|
1921
1940
|
```html
|
|
1922
|
-
<!
|
|
1941
|
+
<!doctype html>
|
|
1923
1942
|
<html lang="en">
|
|
1924
1943
|
<head>
|
|
1925
1944
|
<meta charset="UTF-8" />
|
|
@@ -1940,13 +1959,24 @@ root.render(
|
|
|
1940
1959
|
<div id="root"></div>
|
|
1941
1960
|
</body>
|
|
1942
1961
|
</html>
|
|
1943
|
-
|
|
1944
1962
|
```
|
|
1945
1963
|
|
|
1946
1964
|
**/package.json**
|
|
1947
1965
|
|
|
1948
1966
|
```json
|
|
1949
|
-
{
|
|
1967
|
+
{
|
|
1968
|
+
"dependencies": {
|
|
1969
|
+
"react": "^18.0.0",
|
|
1970
|
+
"react-dom": "^18.0.0",
|
|
1971
|
+
"react-scripts": "^4.0.0"
|
|
1972
|
+
},
|
|
1973
|
+
"devDependencies": {
|
|
1974
|
+
"@types/react": "^18.0.0",
|
|
1975
|
+
"@types/react-dom": "^18.0.0",
|
|
1976
|
+
"typescript": "^4.0.0"
|
|
1977
|
+
},
|
|
1978
|
+
"main": "/index.tsx"
|
|
1979
|
+
}
|
|
1950
1980
|
```
|
|
1951
1981
|
|
|
1952
1982
|
---
|
|
@@ -1980,13 +2010,11 @@ h1 {
|
|
|
1980
2010
|
|
|
1981
2011
|
```json
|
|
1982
2012
|
{
|
|
1983
|
-
"include": [
|
|
1984
|
-
"./**/*"
|
|
1985
|
-
],
|
|
2013
|
+
"include": ["./**/*"],
|
|
1986
2014
|
"compilerOptions": {
|
|
1987
2015
|
"strict": true,
|
|
1988
2016
|
"esModuleInterop": true,
|
|
1989
|
-
"lib": [
|
|
2017
|
+
"lib": ["dom", "es2015"],
|
|
1990
2018
|
"jsx": "react-jsx"
|
|
1991
2019
|
}
|
|
1992
2020
|
}
|
|
@@ -2001,9 +2029,9 @@ import "./styles.css";
|
|
|
2001
2029
|
function App() {
|
|
2002
2030
|
return (
|
|
2003
2031
|
<div className="app">
|
|
2004
|
-
<ButtonDropdown
|
|
2032
|
+
<ButtonDropdown
|
|
2005
2033
|
icon={<Icon sdsIcon="Bacteria" sdsSize="s" sdsType="button" />}
|
|
2006
|
-
sdsType="primary"
|
|
2034
|
+
sdsType="primary"
|
|
2007
2035
|
sdsStyle="square"
|
|
2008
2036
|
>
|
|
2009
2037
|
Bacteria Types
|
|
@@ -2052,13 +2080,12 @@ root.render(
|
|
|
2052
2080
|
<RootApp />
|
|
2053
2081
|
</React.StrictMode>
|
|
2054
2082
|
);
|
|
2055
|
-
|
|
2056
2083
|
```
|
|
2057
2084
|
|
|
2058
2085
|
**/public/index.html**
|
|
2059
2086
|
|
|
2060
2087
|
```html
|
|
2061
|
-
<!
|
|
2088
|
+
<!doctype html>
|
|
2062
2089
|
<html lang="en">
|
|
2063
2090
|
<head>
|
|
2064
2091
|
<meta charset="UTF-8" />
|
|
@@ -2079,13 +2106,24 @@ root.render(
|
|
|
2079
2106
|
<div id="root"></div>
|
|
2080
2107
|
</body>
|
|
2081
2108
|
</html>
|
|
2082
|
-
|
|
2083
2109
|
```
|
|
2084
2110
|
|
|
2085
2111
|
**/package.json**
|
|
2086
2112
|
|
|
2087
2113
|
```json
|
|
2088
|
-
{
|
|
2114
|
+
{
|
|
2115
|
+
"dependencies": {
|
|
2116
|
+
"react": "^18.0.0",
|
|
2117
|
+
"react-dom": "^18.0.0",
|
|
2118
|
+
"react-scripts": "^4.0.0"
|
|
2119
|
+
},
|
|
2120
|
+
"devDependencies": {
|
|
2121
|
+
"@types/react": "^18.0.0",
|
|
2122
|
+
"@types/react-dom": "^18.0.0",
|
|
2123
|
+
"typescript": "^4.0.0"
|
|
2124
|
+
},
|
|
2125
|
+
"main": "/index.tsx"
|
|
2126
|
+
}
|
|
2089
2127
|
```
|
|
2090
2128
|
|
|
2091
2129
|
---
|
|
@@ -2106,19 +2144,19 @@ Documentation for the underlying MUI component can be found here.
|
|
|
2106
2144
|
|
|
2107
2145
|
Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
|
|
2108
2146
|
|
|
2109
|
-
| Name
|
|
2110
|
-
|
|
|
2111
|
-
| `icon`
|
|
2112
|
-
| `sdsStage` | `"on"`
|
|
2113
|
-
| `sdsType`
|
|
2114
|
-
| `sdsSize`
|
|
2115
|
-
| `disabled` | `bool`
|
|
2147
|
+
| Name | Type | Default | Description |
|
|
2148
|
+
| ---------- | ---------- | ----------------------------------- | ---------------------------------------------- | -------------------------------------------------- | ----------------- |
|
|
2149
|
+
| `icon` | `SDSIcon | React.ReactElement<CustomSVGProps>` | `-` | The `icon` element displayed within the component. |
|
|
2150
|
+
| `sdsStage` | `"on"` ` | "off"` | `off` | Controls the toggle stage. |
|
|
2151
|
+
| `sdsType` | `"primary" | "secondary"` | `-` | Type of the button. |
|
|
2152
|
+
| `sdsSize` | `"small" | "medium" | "large"` | `"medium"` | Size of the icon. |
|
|
2153
|
+
| `disabled` | `bool` | `false` | Disables the toggle button when set to `true`. |
|
|
2116
2154
|
|
|
2117
2155
|
### Code examples
|
|
2118
2156
|
|
|
2119
2157
|
#### **Default ButtonToggle**
|
|
2120
2158
|
|
|
2121
|
-
This example has the minimum props needed for the `ButtonToggle` component.
|
|
2159
|
+
This example has the minimum props needed for the `ButtonToggle` component.
|
|
2122
2160
|
|
|
2123
2161
|
**/styles.css**
|
|
2124
2162
|
|
|
@@ -2145,13 +2183,11 @@ h1 {
|
|
|
2145
2183
|
|
|
2146
2184
|
```json
|
|
2147
2185
|
{
|
|
2148
|
-
"include": [
|
|
2149
|
-
"./**/*"
|
|
2150
|
-
],
|
|
2186
|
+
"include": ["./**/*"],
|
|
2151
2187
|
"compilerOptions": {
|
|
2152
2188
|
"strict": true,
|
|
2153
2189
|
"esModuleInterop": true,
|
|
2154
|
-
"lib": [
|
|
2190
|
+
"lib": ["dom", "es2015"],
|
|
2155
2191
|
"jsx": "react-jsx"
|
|
2156
2192
|
}
|
|
2157
2193
|
}
|
|
@@ -2160,18 +2196,18 @@ h1 {
|
|
|
2160
2196
|
**/App.tsx**
|
|
2161
2197
|
|
|
2162
2198
|
```tsx
|
|
2163
|
-
import * as React from
|
|
2199
|
+
import * as React from "react";
|
|
2164
2200
|
import { ButtonToggle } from "@czi-sds/components";
|
|
2165
2201
|
import "./styles.css";
|
|
2166
2202
|
|
|
2167
2203
|
function App() {
|
|
2168
2204
|
const [toggle, setToggle] = React.useState(0);
|
|
2169
|
-
|
|
2205
|
+
|
|
2170
2206
|
return (
|
|
2171
2207
|
<div className="app">
|
|
2172
|
-
<ButtonToggle
|
|
2173
|
-
icon="InfoCircle"
|
|
2174
|
-
sdsStage={toggle ? "on" : "off"}
|
|
2208
|
+
<ButtonToggle
|
|
2209
|
+
icon="InfoCircle"
|
|
2210
|
+
sdsStage={toggle ? "on" : "off"}
|
|
2175
2211
|
onClick={() => setToggle((prev) => !prev)}
|
|
2176
2212
|
>
|
|
2177
2213
|
Label
|
|
@@ -2220,13 +2256,12 @@ root.render(
|
|
|
2220
2256
|
<RootApp />
|
|
2221
2257
|
</React.StrictMode>
|
|
2222
2258
|
);
|
|
2223
|
-
|
|
2224
2259
|
```
|
|
2225
2260
|
|
|
2226
2261
|
**/public/index.html**
|
|
2227
2262
|
|
|
2228
2263
|
```html
|
|
2229
|
-
<!
|
|
2264
|
+
<!doctype html>
|
|
2230
2265
|
<html lang="en">
|
|
2231
2266
|
<head>
|
|
2232
2267
|
<meta charset="UTF-8" />
|
|
@@ -2247,14 +2282,24 @@ root.render(
|
|
|
2247
2282
|
<div id="root"></div>
|
|
2248
2283
|
</body>
|
|
2249
2284
|
</html>
|
|
2250
|
-
|
|
2251
2285
|
```
|
|
2252
2286
|
|
|
2253
2287
|
**/package.json**
|
|
2254
2288
|
|
|
2255
2289
|
```json
|
|
2256
|
-
{
|
|
2290
|
+
{
|
|
2291
|
+
"dependencies": {
|
|
2292
|
+
"react": "^18.0.0",
|
|
2293
|
+
"react-dom": "^18.0.0",
|
|
2294
|
+
"react-scripts": "^4.0.0"
|
|
2295
|
+
},
|
|
2296
|
+
"devDependencies": {
|
|
2297
|
+
"@types/react": "^18.0.0",
|
|
2298
|
+
"@types/react-dom": "^18.0.0",
|
|
2299
|
+
"typescript": "^4.0.0"
|
|
2300
|
+
},
|
|
2301
|
+
"main": "/index.tsx"
|
|
2302
|
+
}
|
|
2257
2303
|
```
|
|
2258
2304
|
|
|
2259
2305
|
---
|
|
2260
|
-
|