Skip to content

Commit 9afca35

Browse files
committed
refactor Icon
1 parent 22075cd commit 9afca35

File tree

2 files changed

+48
-22
lines changed

2 files changed

+48
-22
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import {ArgsTable, Canvas, Meta, Story} from '@storybook/addon-docs/blocks';
2+
import {Icon} from '@ui5/webcomponents-react/lib/Icon';
3+
import '@ui5/webcomponents-icons/dist/icons/employee.js';
4+
import {CSSProperties} from 'react';
5+
6+
import {createSelectArgTypes} from '@shared/stories/createSelectArgTypes';
7+
import {DocsHeader} from '@shared/stories/DocsHeader';
8+
9+
<Meta
10+
title="UI5 Web Components / Icon"
11+
component={Icon}
12+
argTypes={{
13+
...createSelectArgTypes({}),
14+
slot: {control: {disable: true}},
15+
ref: {control: {disable: true}},
16+
style: {
17+
type: CSSProperties,
18+
description:
19+
'Element style which will be appended to the most outer element of a component. Use this prop carefully, some css properties might break the component.'
20+
},
21+
className: {
22+
type: 'string',
23+
description:
24+
'CSS Class Name which will be appended to the most outer element of a component. Use this prop carefully, overwriting CSS rules might break the component.'
25+
},
26+
tooltip: {type: 'string', description: 'A tooltip which will be shown on hover'}
27+
}}
28+
args={{
29+
name: 'employee',
30+
style: {},
31+
className: '',
32+
tooltip: '',
33+
slot: '',
34+
ref: null
35+
}}
36+
/>
37+
38+
<DocsHeader/>
39+
40+
<Canvas>
41+
<Story name="Default">
42+
{(args) => {
43+
return <Icon {...args} />;
44+
}}
45+
</Story>
46+
</Canvas>
47+
48+
<ArgsTable story="."/>

packages/main/src/webComponents/Icon/Icon.stories.tsx

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)