Skip to content

Commit 371d621

Browse files
committed
refactor Label story
1 parent 7187725 commit 371d621

File tree

2 files changed

+48
-20
lines changed

2 files changed

+48
-20
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 {Label} from '@ui5/webcomponents-react/lib/Label';
3+
import {CSSProperties} from 'react';
4+
5+
import {createSelectArgTypes} from '@shared/stories/createSelectArgTypes';
6+
import {DocsHeader} from '@shared/stories/DocsHeader';
7+
8+
<Meta
9+
title="UI5 Web Components / Label"
10+
component={Label}
11+
argTypes={{
12+
...createSelectArgTypes({}),
13+
children: {control: 'text'},
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+
children: 'Label Text',
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 <Label {...args} />;
44+
}}
45+
</Story>
46+
</Canvas>
47+
48+
<ArgsTable story="."/>

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

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

0 commit comments

Comments
 (0)