|
1 | 1 | /* eslint @typescript-eslint/consistent-type-imports: 0 */
|
2 | 2 | import React from 'react'
|
3 | 3 | import './PatternOverrides.css'
|
4 |
| -import {ToggleSwitch, SegmentedControl, ActionList, Button, TextInput, Checkbox, Radio} from '@primer/react' |
| 4 | +import {ToggleSwitch, SegmentedControl, ActionList, Button, TextInput, Checkbox, Radio, Select} from '@primer/react' |
5 | 5 | import {EyeIcon, HeartIcon} from '@primer/octicons-react'
|
6 | 6 |
|
7 | 7 | export default {
|
@@ -45,7 +45,7 @@ export const ActionListScheme = () => {
|
45 | 45 | <ActionList>
|
46 | 46 | <ActionList.Item>New file</ActionList.Item>
|
47 | 47 | <ActionList.Item>Copy link</ActionList.Item>
|
48 |
| - <ActionList.Item>Edit file</ActionList.Item> |
| 48 | + <ActionList.Item disabled>Edit file</ActionList.Item> |
49 | 49 | <ActionList.Divider />
|
50 | 50 | <ActionList.Item variant="danger">Delete file</ActionList.Item>
|
51 | 51 | </ActionList>
|
@@ -184,3 +184,62 @@ export const InputScheme = () => {
|
184 | 184 | </div>
|
185 | 185 | )
|
186 | 186 | }
|
| 187 | + |
| 188 | +export const SelectScheme = () => { |
| 189 | + return ( |
| 190 | + <div style={{display: 'flex', gap: '1rem'}}> |
| 191 | + <Select> |
| 192 | + <Select.Option value="one">Choice one</Select.Option> |
| 193 | + <Select.Option value="two">Choice two</Select.Option> |
| 194 | + </Select> |
| 195 | + <Select disabled> |
| 196 | + <Select.Option value="one">Choice one</Select.Option> |
| 197 | + <Select.Option value="two">Choice two</Select.Option> |
| 198 | + </Select> |
| 199 | + </div> |
| 200 | + ) |
| 201 | +} |
| 202 | + |
| 203 | +export const DisabledControls = () => { |
| 204 | + const count = 12 |
| 205 | + return ( |
| 206 | + <div className="Button" style={{display: 'flex', gap: '1rem', flexDirection: 'column', alignItems: 'start'}}> |
| 207 | + <Select disabled> |
| 208 | + <Select.Option value="one">Choice one</Select.Option> |
| 209 | + <Select.Option value="two">Choice two</Select.Option> |
| 210 | + </Select> |
| 211 | + <TextInput disabled aria-label="Zipcode" name="zipcode" placeholder="Zipcode" autoComplete="postal-code" /> |
| 212 | + <Button variant="outline" id="outline" disabled leadingIcon={HeartIcon} trailingIcon={EyeIcon}> |
| 213 | + Outline |
| 214 | + </Button> |
| 215 | + <Button variant="danger" id="danger" disabled leadingIcon={HeartIcon} trailingIcon={EyeIcon}> |
| 216 | + Danger |
| 217 | + </Button> |
| 218 | + <Button disabled variant="danger" id="danger"> |
| 219 | + Danger |
| 220 | + <Button.Counter>{count}</Button.Counter> |
| 221 | + </Button> |
| 222 | + <Button variant="primary" id="primary" disabled leadingIcon={HeartIcon} trailingIcon={EyeIcon}> |
| 223 | + Primary |
| 224 | + </Button> |
| 225 | + <Button disabled variant="primary" id="primary"> |
| 226 | + Primary |
| 227 | + <Button.Counter>{count}</Button.Counter> |
| 228 | + </Button> |
| 229 | + <Button id="invisible" disabled variant="invisible" leadingIcon={HeartIcon} trailingIcon={EyeIcon}> |
| 230 | + Invisible |
| 231 | + </Button> |
| 232 | + <Button disabled id="invisible" variant="invisible"> |
| 233 | + Invisible |
| 234 | + <Button.Counter>{count}</Button.Counter> |
| 235 | + </Button> |
| 236 | + <Button disabled id="default"> |
| 237 | + Default |
| 238 | + <Button.Counter>{count}</Button.Counter> |
| 239 | + </Button> |
| 240 | + <Button disabled id="default" leadingIcon={HeartIcon} trailingIcon={EyeIcon}> |
| 241 | + Default |
| 242 | + </Button> |
| 243 | + </div> |
| 244 | + ) |
| 245 | +} |
0 commit comments