@workday/canvas-kit-docs 11.0.0-alpha.805-next.0 → 11.0.0-alpha.806-next.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/dist/es6/lib/docs.js +4 -8
- package/dist/mdx/11.0-UPGRADE-GUIDE.mdx +14 -23
- package/dist/mdx/preview-react/form-field/FormField.mdx +6 -0
- package/dist/mdx/preview-react/radio/Radio.mdx +6 -0
- package/dist/mdx/preview-react/status-indicator/StatusIndicator.mdx +6 -0
- package/dist/mdx/react/badge/CountBadge.mdx +5 -0
- package/dist/mdx/react/button/button/Button.mdx +3 -4
- package/dist/mdx/react/button/button/examples/CustomStyles.tsx +36 -72
- package/dist/mdx/react/card/card.mdx +5 -3
- package/dist/mdx/react/checkbox/Checkbox.mdx +5 -0
- package/dist/mdx/react/combobox/Combobox.mdx +6 -0
- package/dist/mdx/react/loading-dots/LoadingDots.mdx +5 -0
- package/dist/mdx/react/select/Select.mdx +13 -7
- package/dist/mdx/react/switch/Switch.mdx +5 -0
- package/dist/mdx/react/table/Table.mdx +6 -0
- package/dist/mdx/react/text/BodyText.mdx +5 -0
- package/dist/mdx/react/text/Heading.mdx +5 -0
- package/dist/mdx/react/text/Subtext.mdx +5 -0
- package/dist/mdx/react/text/Text.mdx +5 -0
- package/dist/mdx/react/text/Title.mdx +5 -0
- package/package.json +6 -6
package/dist/es6/lib/docs.js
CHANGED
|
@@ -129231,8 +129231,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
129231
129231
|
}
|
|
129232
129232
|
],
|
|
129233
129233
|
"tags": {
|
|
129234
|
-
"default": "width of graphic"
|
|
129235
|
-
"deprecated": "Use `cs` to set width, `cs={{\"& svg\": {width: '1rem'}}}`"
|
|
129234
|
+
"default": "width of graphic"
|
|
129236
129235
|
}
|
|
129237
129236
|
},
|
|
129238
129237
|
{
|
|
@@ -129260,8 +129259,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
129260
129259
|
}
|
|
129261
129260
|
],
|
|
129262
129261
|
"tags": {
|
|
129263
|
-
"default": "height of graphic"
|
|
129264
|
-
"deprecated": "Use `cs` to set height, `cs={{\"& svg\": {height: '1rem'}}}`"
|
|
129262
|
+
"default": "height of graphic"
|
|
129265
129263
|
}
|
|
129266
129264
|
},
|
|
129267
129265
|
{
|
|
@@ -129968,8 +129966,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
129968
129966
|
}
|
|
129969
129967
|
],
|
|
129970
129968
|
"tags": {
|
|
129971
|
-
"default": "width of graphic"
|
|
129972
|
-
"deprecated": "Use `cs` to set width, `cs={{\"& svg\": {width: '1rem'}}}`"
|
|
129969
|
+
"default": "width of graphic"
|
|
129973
129970
|
},
|
|
129974
129971
|
"defaultValue": {
|
|
129975
129972
|
"kind": "symbol",
|
|
@@ -130002,8 +129999,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
130002
129999
|
}
|
|
130003
130000
|
],
|
|
130004
130001
|
"tags": {
|
|
130005
|
-
"default": "height of graphic"
|
|
130006
|
-
"deprecated": "Use `cs` to set height, `cs={{\"& svg\": {height: '1rem'}}}`"
|
|
130002
|
+
"default": "height of graphic"
|
|
130007
130003
|
},
|
|
130008
130004
|
"defaultValue": {
|
|
130009
130005
|
"kind": "symbol",
|
|
@@ -14,8 +14,8 @@ any questions.
|
|
|
14
14
|
## Why You Should Upgrade
|
|
15
15
|
|
|
16
16
|
Canvas Kit v11 is transitioning into a
|
|
17
|
-
[new way of styling](https://github.com/Workday/canvas-kit/discussions/2265). Theming and building
|
|
18
|
-
sync Canvas Kit CSS has been at the top of our minds. We've started using our new
|
|
17
|
+
[new way of styling](https://github.com/Workday/canvas-kit/discussions/2265). Theming and building
|
|
18
|
+
an in sync Canvas Kit CSS has been at the top of our minds. We've started using our new
|
|
19
19
|
[Canvas Tokens Web](https://workday.github.io/canvas-tokens/?path=/docs/docs-getting-started--docs)
|
|
20
20
|
package to take advantage of
|
|
21
21
|
[CSS variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) and
|
|
@@ -164,8 +164,8 @@ import {TextInput} from '@workday/canvas-kit-react/text-input';
|
|
|
164
164
|
</FormField>;
|
|
165
165
|
```
|
|
166
166
|
|
|
167
|
-
If you still want to use a `label` element outside of the context of a form, you can use our `Text`
|
|
168
|
-
instead.
|
|
167
|
+
If you still want to use a `label` element outside of the context of a form, you can use our `Text`
|
|
168
|
+
component instead.
|
|
169
169
|
|
|
170
170
|
---
|
|
171
171
|
|
|
@@ -645,11 +645,11 @@ prop.
|
|
|
645
645
|
|
|
646
646
|
```tsx
|
|
647
647
|
// This will no longer be supported in a future major version
|
|
648
|
-
<SystemIcon color="blueberry400"
|
|
648
|
+
<SystemIcon color="blueberry400" />;
|
|
649
649
|
|
|
650
650
|
// Use new tokens instead.
|
|
651
|
-
import {base} from '@workday/canvas-tokens-web'
|
|
652
|
-
<SystemIcon color={base.blueberry400}
|
|
651
|
+
import {base} from '@workday/canvas-tokens-web';
|
|
652
|
+
<SystemIcon color={base.blueberry400} />;
|
|
653
653
|
```
|
|
654
654
|
|
|
655
655
|
🤖 The codemod will handle the change of renaming `styles` to `cs` for you automatically.
|
|
@@ -718,27 +718,18 @@ const MyComponent = StyledRadioButton('div')({
|
|
|
718
718
|
- `graphicStyles` has been deprecated and will be removed in a future version as a part of
|
|
719
719
|
implementation of stencils and new tokens. Consider using `graphicStencil` to get styles or class
|
|
720
720
|
name.
|
|
721
|
-
- `width` and `height` props have been deprecated and will be removed in a future version. Consider
|
|
722
|
-
using `cs` props instead to set `svg` sizes.
|
|
723
|
-
|
|
724
|
-
```tsx
|
|
725
|
-
// before
|
|
726
|
-
<Graphic icon={myGraphic} width={160} />
|
|
727
|
-
|
|
728
|
-
// after
|
|
729
|
-
<Graphic icon={myGraphic} cs={{"& svg": {width: '10rem'}}} />
|
|
730
|
-
```
|
|
731
721
|
|
|
732
722
|
#### Icon
|
|
733
723
|
|
|
734
|
-
This change only impacts internal Canvas Kit code. `Icon` component has been removed and is no
|
|
735
|
-
used to build our icons. It has been replaced by our `Svg` component. Most of our icons now
|
|
724
|
+
This change only impacts internal Canvas Kit code. `Icon` component has been removed and is no
|
|
725
|
+
longer used to build our icons. It has been replaced by our `Svg` component. Most of our icons now
|
|
726
|
+
extend styles from `svgStencil`.
|
|
736
727
|
|
|
737
728
|
#### SystemIcon
|
|
738
729
|
|
|
739
730
|
- `SystemIconStyles` has been deprecated and will be removed in a future version as a part of
|
|
740
|
-
implementation of stencils and new tokens. Consider using `systemIconStencil` to get styles or
|
|
741
|
-
name.
|
|
731
|
+
implementation of stencils and new tokens. Consider using `systemIconStencil` to get styles or
|
|
732
|
+
class name.
|
|
742
733
|
|
|
743
734
|
- `accentHover` is deprecated and will be removed in a future version. Please use the following when
|
|
744
735
|
overriding styles:
|
|
@@ -940,8 +931,8 @@ for this package.
|
|
|
940
931
|
|
|
941
932
|
### Did You Upgrade All Canvas Kit Related Packages?
|
|
942
933
|
|
|
943
|
-
In order for all the packages to work in harmony, you must upgrade all Canvas Kit packages to the
|
|
944
|
-
you're using, including:
|
|
934
|
+
In order for all the packages to work in harmony, you must upgrade all Canvas Kit packages to the
|
|
935
|
+
same version that you're using, including:
|
|
945
936
|
|
|
946
937
|
- `@workday/canvas-kit-react`
|
|
947
938
|
- `@workday/canvas-kit-preview-react`
|
|
@@ -138,6 +138,12 @@ You can theme your error rings by wrapping an input in a `CanvasProvider` and de
|
|
|
138
138
|
|
|
139
139
|
<ExampleCodeBlock code={ThemedError} />
|
|
140
140
|
|
|
141
|
+
### Custom Styles
|
|
142
|
+
|
|
143
|
+
Form Field and its subcomponents support custom styling via the `cs` prop. For more information,
|
|
144
|
+
check our
|
|
145
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
|
|
146
|
+
|
|
141
147
|
## Component API
|
|
142
148
|
|
|
143
149
|
<SymbolDoc name="FormField" fileName="/preview-react/" />
|
|
@@ -137,6 +137,12 @@ Using a form library like [React Hook Form](https://www.react-hook-form.com/) is
|
|
|
137
137
|
Reference this [CodeSandbox](https://codesandbox.io/s/radio-preview-with-react-hook-form-stn5vr) on
|
|
138
138
|
how to use `RadioGroup` with React Hook Form.
|
|
139
139
|
|
|
140
|
+
### Custom Styles
|
|
141
|
+
|
|
142
|
+
Radio and its subcomponents support custom styling via the `cs` prop. For more information, check
|
|
143
|
+
our
|
|
144
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
|
|
145
|
+
|
|
140
146
|
## Component API
|
|
141
147
|
|
|
142
148
|
<SymbolDoc name="RadioGroup" fileName="/preview-react/" />
|
|
@@ -72,6 +72,12 @@ The background color dictated by the `variant` will be dark or light based on th
|
|
|
72
72
|
|
|
73
73
|
<ExampleCodeBlock code={Variants} />
|
|
74
74
|
|
|
75
|
+
### Custom Styles
|
|
76
|
+
|
|
77
|
+
Status Indicator and its subcomponents support custom styling via the `cs` prop. For more
|
|
78
|
+
information, check our
|
|
79
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
|
|
80
|
+
|
|
75
81
|
## Component API
|
|
76
82
|
|
|
77
83
|
<SymbolDoc name="StatusIndicator" fileName="/preview-react/" />
|
|
@@ -49,6 +49,11 @@ the Accessibility guidance below this example for aditional information.
|
|
|
49
49
|
|
|
50
50
|
<ExampleCodeBlock code={NotificationBadge} />
|
|
51
51
|
|
|
52
|
+
### Custom Styles
|
|
53
|
+
|
|
54
|
+
Count Badge supports custom styling via the `cs` prop. For more information, check our
|
|
55
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
|
|
56
|
+
|
|
52
57
|
## Accessibility
|
|
53
58
|
|
|
54
59
|
A common use case for `CountBadge` is displaying notifications, but there are other situations where
|
|
@@ -72,10 +72,9 @@ on a dark or colorful background such as `blueberry400`.
|
|
|
72
72
|
|
|
73
73
|
### Custom Styles
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
of our buttons. Please use this sparingly and try to adhere to the design system.
|
|
75
|
+
All of our buttons support custom styling via the `cs` prop. For more information, check our
|
|
76
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page)
|
|
77
|
+
or view the example below.
|
|
79
78
|
|
|
80
79
|
<ExampleCodeBlock code={CustomStyles} />
|
|
81
80
|
|
|
@@ -1,85 +1,49 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {PrimaryButton} from '@workday/canvas-kit-react/button';
|
|
3
|
+
import {buttonStencil, PrimaryButton, PrimaryButtonProps} from '@workday/canvas-kit-react/button';
|
|
4
4
|
import {Grid} from '@workday/canvas-kit-react/layout';
|
|
5
|
-
import {plusIcon
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
5
|
+
import {plusIcon} from '@workday/canvas-system-icons-web';
|
|
6
|
+
import {createComponent} from '@workday/canvas-kit-react/common';
|
|
7
|
+
import {systemIconStencil} from '@workday/canvas-kit-react/icon';
|
|
8
|
+
import {createStencil, createStyles, handleCsProp, px2rem} from '@workday/canvas-kit-styling';
|
|
9
|
+
import {system} from '@workday/canvas-tokens-web';
|
|
10
10
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
const myButtonStencil = createStencil({
|
|
12
|
+
base: {
|
|
13
|
+
[buttonStencil.vars.background]: system.color.static.green.soft,
|
|
14
|
+
[buttonStencil.vars.label]: system.color.static.green.strong,
|
|
15
|
+
[systemIconStencil.vars.color]: system.color.static.green.strong,
|
|
16
|
+
[buttonStencil.vars.borderRadius]: system.shape.half,
|
|
17
|
+
border: `${px2rem(3)} solid transparent`,
|
|
18
|
+
'&:hover': {
|
|
19
|
+
[buttonStencil.vars.background]: system.color.static.green.default,
|
|
20
|
+
border: `${px2rem(3)} dotted ${system.color.static.green.strong}`,
|
|
21
|
+
[systemIconStencil.vars.color]: system.color.static.green.strong,
|
|
22
|
+
},
|
|
23
|
+
'&:active': {
|
|
24
|
+
[buttonStencil.vars.background]: system.color.static.green.strong,
|
|
25
|
+
[buttonStencil.vars.label]: system.color.fg.inverse,
|
|
26
|
+
[systemIconStencil.vars.color]: system.color.fg.inverse,
|
|
17
27
|
},
|
|
18
|
-
|
|
19
|
-
background: colors.berrySmoothie500,
|
|
20
|
-
label: colors.frenchVanilla100,
|
|
21
|
-
},
|
|
22
|
-
active: {},
|
|
23
|
-
focus: {},
|
|
24
|
-
disabled: {},
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const StyledPrimaryButton = styled(PrimaryButton)({
|
|
29
|
-
height: space.l,
|
|
30
|
-
fontStyle: 'italic',
|
|
28
|
+
},
|
|
31
29
|
});
|
|
32
30
|
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
const MyCustomButton = createComponent('button')({
|
|
32
|
+
Component: ({children, size, ...elemProps}: PrimaryButtonProps, ref, Element) => (
|
|
33
|
+
<PrimaryButton ref={ref} {...handleCsProp(elemProps, myButtonStencil({size}))}>
|
|
34
|
+
{children}
|
|
35
|
+
</PrimaryButton>
|
|
36
|
+
),
|
|
36
37
|
});
|
|
37
38
|
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
contrast: 'turquoise',
|
|
43
|
-
},
|
|
44
|
-
alert: {
|
|
45
|
-
main: 'coral',
|
|
46
|
-
},
|
|
47
|
-
error: {
|
|
48
|
-
main: 'crimson',
|
|
49
|
-
},
|
|
50
|
-
success: {
|
|
51
|
-
main: 'aquamarine',
|
|
52
|
-
},
|
|
53
|
-
neutral: {
|
|
54
|
-
main: 'gray',
|
|
55
|
-
},
|
|
56
|
-
common: {
|
|
57
|
-
focusOutline: 'turquoise',
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
};
|
|
39
|
+
const myCustomStyles = createStyles({
|
|
40
|
+
padding: system.space.x4,
|
|
41
|
+
textTransform: 'uppercase',
|
|
42
|
+
});
|
|
61
43
|
|
|
62
44
|
export default () => (
|
|
63
|
-
<Grid
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
border="3px dotted red"
|
|
67
|
-
backgroundColor="cyan"
|
|
68
|
-
color={colors.blackPepper400}
|
|
69
|
-
>
|
|
70
|
-
Styled with style properties
|
|
71
|
-
</PrimaryButton>
|
|
72
|
-
<PrimaryButton colors={getDropdownColors()} icon={plusIcon} iconPosition="start">
|
|
73
|
-
Styled with colors prop
|
|
74
|
-
</PrimaryButton>
|
|
75
|
-
<StyledPrimaryButton icon={caretDownIcon} iconPosition="end">
|
|
76
|
-
Overwrite styles with emotion
|
|
77
|
-
</StyledPrimaryButton>
|
|
78
|
-
<PrimaryButton cs={customStyles} icon={caretDownIcon} iconPosition="end">
|
|
79
|
-
Overwrite styles with createStyles
|
|
80
|
-
</PrimaryButton>
|
|
81
|
-
<CanvasProvider theme={{canvas: customColorTheme}}>
|
|
82
|
-
<PrimaryButton>Custom Theme</PrimaryButton>
|
|
83
|
-
</CanvasProvider>
|
|
45
|
+
<Grid cs={{gap: px2rem(4), gridTemplateColumns: 'repeat(3, 1fr)', alignItems: 'center'}}>
|
|
46
|
+
<MyCustomButton icon={plusIcon}>Styling Override Via Stencil Variables</MyCustomButton>
|
|
47
|
+
<PrimaryButton cs={myCustomStyles}>Style Override Via Create Styles</PrimaryButton>
|
|
84
48
|
</Grid>
|
|
85
49
|
);
|
|
@@ -30,16 +30,18 @@ yarn add @workday/canvas-kit-react
|
|
|
30
30
|
|
|
31
31
|
<ExampleCodeBlock code={Basic} />
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
### Custom Styles
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Card and its subcomponents support custom styling via the `cs` prop. For more information, check our
|
|
36
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
|
|
36
37
|
|
|
37
38
|
<ExampleCodeBlock code={WithCustomStyles} />
|
|
38
39
|
|
|
39
40
|
## Stencils
|
|
40
41
|
|
|
41
42
|
You can also use `Card` stencils to extend styles for your own custom components. This allows you to
|
|
42
|
-
compose styles without using components directly. In the example below, we're extending `Card`
|
|
43
|
+
compose styles without using components directly. In the example below, we're extending `Card`
|
|
44
|
+
stencils to create a custom `MenuCard` component.
|
|
43
45
|
|
|
44
46
|
<ExampleCodeBlock code={WithStencils} />
|
|
45
47
|
|
|
@@ -112,6 +112,11 @@ or `Checkbox.ErrorType.Error` if Form Field is not being used.
|
|
|
112
112
|
|
|
113
113
|
<ExampleCodeBlock code={Error} />
|
|
114
114
|
|
|
115
|
+
### Custom Styles
|
|
116
|
+
|
|
117
|
+
Checkbox supports custom styling via the `cs` prop. For more information, check our
|
|
118
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
|
|
119
|
+
|
|
115
120
|
## Component API
|
|
116
121
|
|
|
117
122
|
<SymbolDoc name="Checkbox" fileName="/react/" />
|
|
@@ -38,6 +38,12 @@ communicating with a server.
|
|
|
38
38
|
|
|
39
39
|
<ExampleCodeBlock code={Autocomplete} />
|
|
40
40
|
|
|
41
|
+
### Custom Styles
|
|
42
|
+
|
|
43
|
+
Combobox and its subcomponents support custom styling via the `cs` prop. For more information, check
|
|
44
|
+
our
|
|
45
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
|
|
46
|
+
|
|
41
47
|
## Component API
|
|
42
48
|
|
|
43
49
|
<SymbolDoc name="Combobox" fileName="/react/" hideDescription />
|
|
@@ -28,6 +28,11 @@ yarn add @workday/canvas-kit-react
|
|
|
28
28
|
|
|
29
29
|
<ExampleCodeBlock code={RTL} />
|
|
30
30
|
|
|
31
|
+
### Custom Styles
|
|
32
|
+
|
|
33
|
+
Loading Dots supports custom styling via the `cs` prop. For more information, check our
|
|
34
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
|
|
35
|
+
|
|
31
36
|
### Adding screen reader support to loading animations
|
|
32
37
|
|
|
33
38
|
Sometimes, letting users know when content has finished loading is just as important as asking users
|
|
@@ -233,9 +233,9 @@ properties of `id` or `text`. Using these helper functions sets the `serverId` t
|
|
|
233
233
|
|
|
234
234
|
### Complex
|
|
235
235
|
|
|
236
|
-
When registering items in an array of objects, it's common to have the text that is displayed to the
|
|
237
|
-
different than an id. In this example, `serverId` and `label` properties need to be remapped
|
|
238
|
-
`id` and `text` hence the usage of `getId` and `getTextValue`. If your object has the properties
|
|
236
|
+
When registering items in an array of objects, it's common to have the text that is displayed to the
|
|
237
|
+
user be different than an id. In this example, `serverId` and `label` properties need to be remapped
|
|
238
|
+
to `id` and `text` hence the usage of `getId` and `getTextValue`. If your object has the properties
|
|
239
239
|
`text` and `id`, there would be no need for this.
|
|
240
240
|
|
|
241
241
|
<ExampleCodeBlock code={Complex} />
|
|
@@ -261,10 +261,10 @@ const items = [
|
|
|
261
261
|
|
|
262
262
|
- `getId`: This is an optional function to return the id of an item. If not provided, the default
|
|
263
263
|
function will return the `id` property from the object of each item. If you did not provide
|
|
264
|
-
`items`, do not override this function. Instead provide static
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
264
|
+
`items`, do not override this function. Instead provide static items via JSX. the list will create
|
|
265
|
+
an internal array of items where `id` is the only property and the default `getId` will return the
|
|
266
|
+
desired result. **Note: If your array of objects has a different property for `id`, like
|
|
267
|
+
`serverId`, use this function to set the id.**
|
|
268
268
|
|
|
269
269
|
```tsx
|
|
270
270
|
const options = [{text: 'Pizza', serverId: 'pizza-1'}, {text: 'Cheeseburger', serverId: 'cheeseburger'}]
|
|
@@ -300,6 +300,12 @@ const items = [
|
|
|
300
300
|
</Select>
|
|
301
301
|
```
|
|
302
302
|
|
|
303
|
+
### Custom Styles
|
|
304
|
+
|
|
305
|
+
Select and its subcomponents support custom styling via the `cs` prop. For more information, check
|
|
306
|
+
our
|
|
307
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
|
|
308
|
+
|
|
303
309
|
## Component API
|
|
304
310
|
|
|
305
311
|
<SymbolDoc name="Select" fileName="/react/" />
|
|
@@ -81,6 +81,11 @@ The `error` prop may be applied directly to the Switch with a value of `Switch.E
|
|
|
81
81
|
|
|
82
82
|
<ExampleCodeBlock code={Error} />
|
|
83
83
|
|
|
84
|
+
### Custom Styles
|
|
85
|
+
|
|
86
|
+
Switch supports custom styling via the `cs` prop. For more information, check our
|
|
87
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
|
|
88
|
+
|
|
84
89
|
## Component API
|
|
85
90
|
|
|
86
91
|
<SymbolDoc name="Switch" fileName="/react/" />
|
|
@@ -61,6 +61,12 @@ You can also find several advanced Table examples in our Storybook Examples sect
|
|
|
61
61
|
- [Selectable Rows ](/docs/examples-tables-advanced--selectable-rows)
|
|
62
62
|
- [Sortable Column Headers](/docs/examples-tables-advanced--sortable-column-headers)
|
|
63
63
|
|
|
64
|
+
### Custom Styles
|
|
65
|
+
|
|
66
|
+
Table and its subcomponents support custom styling via the `cs` prop. For more information, check
|
|
67
|
+
our
|
|
68
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
|
|
69
|
+
|
|
64
70
|
## Component API
|
|
65
71
|
|
|
66
72
|
<SymbolDoc name="Table" fileName="/react/" />
|
|
@@ -28,6 +28,11 @@ You may override the rendered element using the `as` prop.
|
|
|
28
28
|
|
|
29
29
|
<ExampleCodeBlock code={Basic} />
|
|
30
30
|
|
|
31
|
+
### Custom Styles
|
|
32
|
+
|
|
33
|
+
Body Text supports custom styling via the `cs` prop. For more information, check our
|
|
34
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
|
|
35
|
+
|
|
31
36
|
## Component API
|
|
32
37
|
|
|
33
38
|
<SymbolDoc name="BodyText" fileName="/react/" />
|
|
@@ -28,6 +28,11 @@ according to the [Canvas type hierarchy](/tokens/type/#type-styles).
|
|
|
28
28
|
|
|
29
29
|
<ExampleCodeBlock code={Basic} />
|
|
30
30
|
|
|
31
|
+
### Custom Styles
|
|
32
|
+
|
|
33
|
+
Heading supports custom styling via the `cs` prop. For more information, check our
|
|
34
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
|
|
35
|
+
|
|
31
36
|
## Component API
|
|
32
37
|
|
|
33
38
|
<SymbolDoc name="Heading" fileName="/react/text/" />
|
|
@@ -28,6 +28,11 @@ You may override the rendered element using the `as` prop.
|
|
|
28
28
|
|
|
29
29
|
<ExampleCodeBlock code={Basic} />
|
|
30
30
|
|
|
31
|
+
### Custom Styles
|
|
32
|
+
|
|
33
|
+
Subtext supports custom styling via the `cs` prop. For more information, check our
|
|
34
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
|
|
35
|
+
|
|
31
36
|
## Component API
|
|
32
37
|
|
|
33
38
|
<SymbolDoc name="Subtext" fileName="/react/text/" />
|
|
@@ -43,6 +43,11 @@ understanding of the text being rendered.
|
|
|
43
43
|
|
|
44
44
|
<ExampleCodeBlock code={Variant} />
|
|
45
45
|
|
|
46
|
+
### Custom Styles
|
|
47
|
+
|
|
48
|
+
Text supports custom styling via the `cs` prop. For more information, check our
|
|
49
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
|
|
50
|
+
|
|
46
51
|
## Component API
|
|
47
52
|
|
|
48
53
|
<SymbolDoc name="Text" fileName="/react/" />
|
|
@@ -28,6 +28,11 @@ You may override the rendered element using the `as` prop.
|
|
|
28
28
|
|
|
29
29
|
<ExampleCodeBlock code={Basic} />
|
|
30
30
|
|
|
31
|
+
### Custom Styles
|
|
32
|
+
|
|
33
|
+
Title supports custom styling via the `cs` prop. For more information, check our
|
|
34
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
|
|
35
|
+
|
|
31
36
|
## Component API
|
|
32
37
|
|
|
33
38
|
<SymbolDoc name="Title" filePath="/react/text/" />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-docs",
|
|
3
|
-
"version": "11.0.0-alpha.
|
|
3
|
+
"version": "11.0.0-alpha.806-next.0",
|
|
4
4
|
"description": "Documentation components of Canvas Kit components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@emotion/styled": "^11.6.0",
|
|
46
46
|
"@storybook/csf": "0.0.1",
|
|
47
|
-
"@workday/canvas-kit-labs-react": "^11.0.0-alpha.
|
|
48
|
-
"@workday/canvas-kit-preview-react": "^11.0.0-alpha.
|
|
49
|
-
"@workday/canvas-kit-react": "^11.0.0-alpha.
|
|
50
|
-
"@workday/canvas-kit-styling": "^11.0.0-alpha.
|
|
47
|
+
"@workday/canvas-kit-labs-react": "^11.0.0-alpha.806-next.0",
|
|
48
|
+
"@workday/canvas-kit-preview-react": "^11.0.0-alpha.806-next.0",
|
|
49
|
+
"@workday/canvas-kit-react": "^11.0.0-alpha.806-next.0",
|
|
50
|
+
"@workday/canvas-kit-styling": "^11.0.0-alpha.806-next.0",
|
|
51
51
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
52
52
|
"@workday/canvas-tokens-web": "^1.3.1",
|
|
53
53
|
"markdown-to-jsx": "^6.10.3",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"mkdirp": "^1.0.3",
|
|
60
60
|
"typescript": "4.2"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "e63ea2872118b6c1e10d3014d088c8ef1b27a8f8"
|
|
63
63
|
}
|