Skip to content

Commit 666dfec

Browse files
committed
refactor RatingIndicator prop description + story
1 parent cad353a commit 666dfec

File tree

2 files changed

+37
-10
lines changed

2 files changed

+37
-10
lines changed
Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,36 @@
1-
import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs/blocks';
2-
import { RatingIndicator } from '@ui5/webcomponents-react/lib/RatingIndicator';
3-
import { DocsHeader } from '@shared/stories/DocsHeader';
1+
import {ArgsTable, Canvas, Meta, Story} from '@storybook/addon-docs/blocks';
2+
import {RatingIndicator} from '@ui5/webcomponents-react/lib/RatingIndicator';
3+
import {CSSProperties} from 'react';
4+
5+
import {createSelectArgTypes} from '@shared/stories/createSelectArgTypes';
6+
import {DocsHeader} from '@shared/stories/DocsHeader';
47

58
<Meta
6-
title="UI5 Web Components / RatingIndicator"
7-
component={RatingIndicator}
8-
args={{
9-
value: 3
10-
}}
9+
title="UI5 Web Components / RatingIndicator"
10+
component={RatingIndicator}
11+
argTypes={{
12+
...createSelectArgTypes({}),
13+
slot: {control: {disable: true}},
14+
ref: {control: {disable: true}},
15+
style: {
16+
type: CSSProperties,
17+
description:
18+
'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.'
19+
},
20+
className: {
21+
type: 'string',
22+
description:
23+
'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.'
24+
},
25+
tooltip: {type: 'string', description: 'A tooltip which will be shown on hover'}
26+
}}
27+
args={{
28+
style: {},
29+
className: '',
30+
tooltip: '',
31+
slot: '',
32+
ref: null
33+
}}
1134
/>
1235

1336
<DocsHeader />
@@ -20,4 +43,8 @@ import { DocsHeader } from '@shared/stories/DocsHeader';
2043
</Story>
2144
</Canvas>
2245

23-
<ArgsTable story="." />
46+
<ArgsTable story="."/>
47+
<div style={{fontFamily: 'var(--sapFontFamily)', fontSize: 'var(--sapFontSize)', color: 'var(--sapTextColor)'}}>
48+
<h3>Usage</h3>
49+
The reccomended number of icons is between 5 and 7.
50+
</div>

packages/main/src/webComponents/RatingIndicator/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export interface RatingIndicatorPropTypes extends Omit<WithWebComponentPropTypes
1818
*/
1919
readonly?: boolean;
2020
/**
21-
* The indicated value of the rating <br><br> <b>Note:</b> If you set a number which is not round, it would be shown as follows: <ul> <li>1.0 - 1.2 -> 1</li> <li>1.3 - 1.7 -> 1.5</li> <li>1.8 - 1.9 -> 2</li> <ul>
21+
* The indicated value of the rating <br><br> <b>Note:</b> If you set a number which is not round, it would be shown as follows: <ul><li>1.0 - 1.2 -> 1</li><li>1.3 - 1.7 -> 1.5</li><li>1.8 - 1.9 -> 2</li></ul>
2222
*/
2323
value?: number;
2424
/**

0 commit comments

Comments
 (0)