@workday/canvas-kit-docs 7.0.6 → 7.0.7
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.
|
@@ -4,6 +4,7 @@ import Checkbox from '@workday/canvas-kit-react/checkbox/lib/Checkbox.tsx';
|
|
|
4
4
|
|
|
5
5
|
import Alert from './examples/Alert';
|
|
6
6
|
import Basic from './examples/Basic';
|
|
7
|
+
import Inverse from './examples/Inverse';
|
|
7
8
|
import Disabled from './examples/Disabled';
|
|
8
9
|
import Error from './examples/Error';
|
|
9
10
|
import Indeterminate from './examples/Indeterminate';
|
|
@@ -35,6 +36,12 @@ element.
|
|
|
35
36
|
|
|
36
37
|
<ExampleCodeBlock code={Basic} />
|
|
37
38
|
|
|
39
|
+
### Inverse
|
|
40
|
+
|
|
41
|
+
Checkbox with inverse variation
|
|
42
|
+
|
|
43
|
+
<ExampleCodeBlock code={Inverse} />
|
|
44
|
+
|
|
38
45
|
### Disabled
|
|
39
46
|
|
|
40
47
|
Set the `disabled` prop of the Checkbox to prevent users from interacting with it.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {Checkbox} from '@workday/canvas-kit-react/checkbox';
|
|
3
|
+
import {HStack} from '@workday/canvas-kit-react/layout';
|
|
4
|
+
|
|
5
|
+
export default () => {
|
|
6
|
+
const [checked, setChecked] = React.useState(false);
|
|
7
|
+
|
|
8
|
+
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
|
9
|
+
setChecked(event.target.checked);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<HStack spacing="s" backgroundColor="blueberry400" padding="s">
|
|
14
|
+
<Checkbox
|
|
15
|
+
variant="inverse"
|
|
16
|
+
checked={checked}
|
|
17
|
+
label="I agree to the terms"
|
|
18
|
+
onChange={handleChange}
|
|
19
|
+
/>
|
|
20
|
+
</HStack>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
@@ -5,6 +5,7 @@ import {Radio, RadioGroup} from '@workday/canvas-kit-react/radio';
|
|
|
5
5
|
import Alert from './examples/Alert';
|
|
6
6
|
import Basic from './examples/Basic';
|
|
7
7
|
import Disabled from './examples/Disabled';
|
|
8
|
+
import Inverse from './examples/Inverse';
|
|
8
9
|
import Error from './examples/Error';
|
|
9
10
|
import LabelPosition from './examples/LabelPosition';
|
|
10
11
|
import NoValue from './examples/NoValue';
|
|
@@ -41,6 +42,12 @@ Set the `disabled` prop of the Radio Button to prevent users from interacting wi
|
|
|
41
42
|
|
|
42
43
|
<ExampleCodeBlock code={Disabled} />
|
|
43
44
|
|
|
45
|
+
### Inverse
|
|
46
|
+
|
|
47
|
+
Radio with inverse variant
|
|
48
|
+
|
|
49
|
+
<ExampleCodeBlock code={Inverse} />
|
|
50
|
+
|
|
44
51
|
### Radio Buttons with No Values
|
|
45
52
|
|
|
46
53
|
The `value` prop may be omitted from Radio Buttons, in which case the `value` prop of the Radio
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {FormField} from '@workday/canvas-kit-react/form-field';
|
|
3
|
+
import {Radio, RadioGroup} from '@workday/canvas-kit-react/radio';
|
|
4
|
+
import {Box} from '@workday/canvas-kit-react/layout';
|
|
5
|
+
|
|
6
|
+
export default () => {
|
|
7
|
+
const [value, setValue] = React.useState<string | number>('deep-dish');
|
|
8
|
+
|
|
9
|
+
const handleChange = (value: string | number) => {
|
|
10
|
+
setValue(value);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<Box backgroundColor="blueberry400" padding="s">
|
|
15
|
+
<RadioGroup name="crust" onChange={handleChange} value={value}>
|
|
16
|
+
<Radio variant="inverse" label="Deep dish" value="deep-dish" />
|
|
17
|
+
<Radio variant="inverse" label="Thin" value="thin" />
|
|
18
|
+
<Radio variant="inverse" label="Gluten free" value="gluten-free" />
|
|
19
|
+
<Radio variant="inverse" label="Cauliflower" value="cauliflower" />
|
|
20
|
+
</RadioGroup>
|
|
21
|
+
</Box>
|
|
22
|
+
);
|
|
23
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-docs",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.7",
|
|
4
4
|
"description": "Documentation components of Canvas Kit components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@storybook/csf": "0.0.1",
|
|
44
|
-
"@workday/canvas-kit-react": "^7.0.
|
|
44
|
+
"@workday/canvas-kit-react": "^7.0.7"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"fs-extra": "^10.0.0",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"mkdirp": "^1.0.3",
|
|
50
50
|
"typescript": "4.1"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "ea3eafb31497479dd35c38da2170cfab8ec7bcf9"
|
|
53
53
|
}
|