|
1 |
| -import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs/blocks'; |
| 1 | +import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs/blocks'; |
2 | 2 | import { Badge } from '@ui5/webcomponents-react/lib/Badge';
|
3 | 3 | import '@ui5/webcomponents-icons/dist/icons/employee.js';
|
4 | 4 | import { Icon } from '@ui5/webcomponents-react/lib/Icon';
|
5 |
| -import { CSSProperties, Ref } from 'react'; |
| 5 | +import { FlexBox } from '@ui5/webcomponents-react/lib/FlexBox'; |
| 6 | +import { FlexBoxWrap } from '@ui5/webcomponents-react/lib/FlexBoxWrap'; |
| 7 | +import { CSSProperties } from 'react'; |
6 | 8 |
|
7 | 9 | import { createSelectArgTypes } from '@shared/stories/createSelectArgTypes';
|
8 | 10 | import { DocsHeader } from '@shared/stories/DocsHeader';
|
@@ -50,14 +52,57 @@ import { DocsHeader } from '@shared/stories/DocsHeader';
|
50 | 52 | </Canvas>
|
51 | 53 |
|
52 | 54 | <ArgsTable story="." />
|
53 |
| -<div style={{fontFamily:'var(--sapFontFamily)', fontSize:'var(--sapFontSize)', color:'var(--sapTextColor)'}}> |
54 |
| -<h3>Usage Guidelines</h3> |
55 |
| -<ul> |
56 |
| - <li>If the text is longer than the width of the component, it doesn’t wrap, it shows ellipsis.</li> |
57 |
| - <li> |
58 |
| - When truncated, the full text is not visible, therefore, it’s recommended to make more space for longer texts to be |
59 |
| - fully displayed. |
60 |
| - </li> |
61 |
| - <li>Colors are not semantic and have no visual representation in High Contrast Black (sap_belize_hcb) theme.</li> |
62 |
| -</ul> |
63 |
| -</div> |
| 55 | +<div style={{ fontFamily: 'var(--sapFontFamily)', fontSize: 'var(--sapFontSize)', color: 'var(--sapTextColor)' }}> |
| 56 | + <h3>Usage Guidelines</h3> |
| 57 | + <ul> |
| 58 | + <li>If the text is longer than the width of the component, it doesn’t wrap, it shows ellipsis.</li> |
| 59 | + <li> |
| 60 | + When truncated, the full text is not visible, therefore, it’s recommended to make more space for longer texts to |
| 61 | + be fully displayed. |
| 62 | + </li> |
| 63 | + <li>Colors are not semantic and have no visual representation in High Contrast Black (sap_belize_hcb) theme.</li> |
| 64 | + </ul> |
| 65 | +</div> |
| 66 | + |
| 67 | +# Stories |
| 68 | + |
| 69 | +## All available Badge colors |
| 70 | + |
| 71 | +<Canvas> |
| 72 | + <Story name="All colors"> |
| 73 | + {() => { |
| 74 | + return ( |
| 75 | + <FlexBox wrap={FlexBoxWrap.Wrap}> |
| 76 | + <Badge colorScheme="1" style={{ marginRight: '10px', marginBottom: '10px' }}> |
| 77 | + colorScheme = "1" |
| 78 | + </Badge> |
| 79 | + <Badge colorScheme="2" style={{ marginRight: '10px', marginBottom: '10px' }}> |
| 80 | + colorScheme = "2" |
| 81 | + </Badge> |
| 82 | + <Badge colorScheme="3" style={{ marginRight: '10px', marginBottom: '10px' }}> |
| 83 | + colorScheme = "3" |
| 84 | + </Badge> |
| 85 | + <Badge colorScheme="4" style={{ marginRight: '10px', marginBottom: '10px' }}> |
| 86 | + colorScheme = "4" |
| 87 | + </Badge> |
| 88 | + <Badge colorScheme="5" style={{ marginRight: '10px', marginBottom: '10px' }}> |
| 89 | + colorScheme = "5" |
| 90 | + </Badge> |
| 91 | + <Badge colorScheme="6" style={{ marginRight: '10px', marginBottom: '10px' }}> |
| 92 | + colorScheme = "6" |
| 93 | + </Badge> |
| 94 | + <Badge colorScheme="7" style={{ marginRight: '10px', marginBottom: '10px' }}> |
| 95 | + colorScheme = "7" |
| 96 | + </Badge> |
| 97 | + <Badge colorScheme="8" style={{ marginRight: '10px', marginBottom: '10px' }}> |
| 98 | + colorScheme = "8" |
| 99 | + </Badge> |
| 100 | + <Badge colorScheme="9" style={{ marginRight: '10px', marginBottom: '10px' }}> |
| 101 | + colorScheme = "9" |
| 102 | + </Badge> |
| 103 | + <Badge colorScheme="10">colorScheme = "10"</Badge> |
| 104 | + </FlexBox> |
| 105 | + ); |
| 106 | + }} |
| 107 | + </Story> |
| 108 | +</Canvas> |
0 commit comments