@workday/canvas-kit-docs 7.0.7 → 7.0.8

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.
@@ -3,6 +3,7 @@ import {Specifications} from '@workday/canvas-kit-docs';
3
3
 
4
4
  import Basic from './examples/Basic';
5
5
  import Icons from './examples/Icons';
6
+ import DeleteAction from './examples/DeleteAction';
6
7
  import OverflowActionBar from './examples/OverflowActionBar';
7
8
 
8
9
 
@@ -34,11 +35,18 @@ buttons should not be used in the Action Bar.
34
35
 
35
36
  ### Icons Example
36
37
 
37
- `ActionBar.Item` renders a `PrimaryButton` or `SecondaryButton`, so it's possible to use other
38
- Button props with `ActionBar.Item` such as `icon` or `size`.
38
+ `ActionBar.Item` renders a `SecondaryButton` as default, so it's possible to use other Button props
39
+ with `ActionBar.Item` such as `icon` or `size`.
39
40
 
40
41
  <ExampleCodeBlock code={Icons} />
41
42
 
43
+ ### Delete Action Example
44
+
45
+ `ActionBar.Item` is a `SecondaryButton` by default but it's posible to change it to another element,
46
+ such as `DeleteButton`, by using `as` prop.
47
+
48
+ <ExampleCodeBlock code={DeleteAction} />
49
+
42
50
  ### Overflow Example
43
51
 
44
52
  `ActionBar` container can contain up to 3 actions and an Overflow Menu if there are more than 3
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+
3
+ import {ActionBar} from '@workday/canvas-kit-react/action-bar';
4
+ import {DeleteButton} from '@workday/canvas-kit-react/button';
5
+
6
+ export default () => {
7
+ return (
8
+ <ActionBar>
9
+ <ActionBar.List position="relative">
10
+ <ActionBar.Item as={DeleteButton}>Delete Action</ActionBar.Item>
11
+ <ActionBar.Item>Second Action</ActionBar.Item>
12
+ </ActionBar.List>
13
+ </ActionBar>
14
+ );
15
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-docs",
3
- "version": "7.0.7",
3
+ "version": "7.0.8",
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.7"
44
+ "@workday/canvas-kit-react": "^7.0.8"
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": "ea3eafb31497479dd35c38da2170cfab8ec7bcf9"
52
+ "gitHead": "5ab849b6b650a2d4b0a9ea029d2f0df62f84dd40"
53
53
  }