Skip to content

Commit 525e1c4

Browse files
MaxGammelGammel
andauthored
docs: updates storybook documentation (#2382)
* feat(storybook-vue): added multiple props to component documentation in storybook * feat(storybook-vue): added types to logged out and logged in in telekom brand header component * docs(storybook-vue): refactors props for multiple component documentation in storybook * "docs(storybook-vue): refactors props for multiple component documentation in storybook * docs(storybook-vue): refactors props for multiple component documentation in storybook * docs(storybook-vue): refactors props for multiple component documentation in storybook --------- Co-authored-by: Gammel <max.gammel@telekom.de>
1 parent 0874436 commit 525e1c4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+318
-63
lines changed

packages/storybook-vue/stories/components/breadcrumb/ScaleBreadcrumb.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
:styles="styles"
55
>
66
<slot></slot>
7-
<slot name="separator"></slot>
87
</scale-breadcrumb>
98
</template>
109

1110
<script>
1211
export default {
1312
props: {
14-
separator: String,
13+
separator: { type: String},
1514
styles: { type: String }
1615
},
1716
}

packages/storybook-vue/stories/components/button/ScaleButton.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
:value="value"
1111
:variant="variant"
1212
:icon-only="iconOnly"
13+
:icon-position="iconPosition"
1314
:inner-tabindex="innerTabindex"
1415
:inner-aria-label="innerAriaLabel"
1516
:styles="styles"
@@ -36,6 +37,7 @@ export default {
3637
variant: String,
3738
size: String,
3839
iconOnly: Boolean,
40+
iconPosition: String,
3941
innerTabindex: Number,
4042
innerAriaLabel: String,
4143
styles: String,

packages/storybook-vue/stories/components/checkbox-group/CheckboxGroup.stories.mdx

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,26 @@ import ScaleCheckboxGroup from './ScaleCheckboxGroup.vue';
1313
argTypes={{}}
1414
/>
1515

16+
export const Template = (args, { argTypes }) => ({
17+
components: { ScaleCheckboxGroup },
18+
props: ScaleCheckboxGroup.props,
19+
template: `
20+
<scale-checkbox-group
21+
:name="name"
22+
:label="label"
23+
:helper-text="helperText"
24+
:aria-label-checkbox-group="ariaLabelCheckboxGroup"
25+
:invalid="invalid"
26+
:select-text="selectText"
27+
:unselect-text="unselectText"
28+
:value="value"
29+
:input-id="inputId"
30+
:styles="styles"
31+
:status="status"
32+
></scale-checkbox-group>
33+
`,
34+
});
35+
1636
<div
1737
style={{
1838
display: 'inline-flex',
@@ -28,7 +48,9 @@ import ScaleCheckboxGroup from './ScaleCheckboxGroup.vue';
2848
## Standard
2949

3050
<Canvas withSource="none">
31-
<Story name="Standard" args={{}}>
51+
<Story
52+
name="Standard"
53+
args={{}}>
3254
{() => ({
3355
template: `
3456
<scale-checkbox-group label="Group Label" name="group" value="">

packages/storybook-vue/stories/components/checkbox-group/ScaleCheckboxGroup.vue

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
<template>
2-
<div>
3-
<!-- this has the slots show up in ArgsTable -->
2+
<scale-checkbox-group>
3+
:name="name"
4+
:label="label"
5+
:helper-text="helperText"
6+
:aria-label-checkbox-group="ariaLabelCheckboxGroup"
7+
:invalid="invalid"
8+
:select-text="selectText"
9+
:unselect-text="unselectText"
10+
:value="value"
11+
:input-id="inputId"
12+
:styles="styles"
13+
:status="status"
414
<slot></slot>
5-
</div>
15+
</scale-checkbox-group>
616
</template>
717

818
<script>
@@ -11,14 +21,14 @@ export default {
1121
name: { type: String },
1222
label: { type: String, default: '' },
1323
helperText: { type: String },
14-
ariaLabelCheckboxGroup: { type: String },
24+
ariaLabelCheckboxGroup: { type: String, default: 'COMMENT: ariaLabelCheckboxGroup should replace ariaLabel' },
1525
invalid: { type: Boolean },
1626
selectText: { type: String, default: 'Select all' },
1727
unselectText: { type: String, default: 'Unselect all' },
1828
value: { type: String, default: '' },
1929
inputId: { type: String },
2030
styles: { type: String },
31+
status: { type: String, default: 'COMMENT: DEPRECATED - invalid should replace status'}
2132
},
2233
};
2334
</script>
24-

packages/storybook-vue/stories/components/checkbox/Checkbox.stories.mdx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@ import {
88
import ScaleCheckbox from './ScaleCheckbox.vue';
99
import { action } from '@storybook/addon-actions';
1010

11-
<Meta title="Components/Checkbox" component={ScaleCheckbox} argTypes={{}} />
11+
<Meta
12+
title="Components/Checkbox"
13+
component={ScaleCheckbox}
14+
argTypes={{
15+
status: {
16+
description: 'DEPRECATED - invalid should replace status'
17+
}
18+
}}
19+
/>
1220

1321
export const Template = (args, { argTypes }) => ({
1422
props: {
@@ -27,6 +35,9 @@ export const Template = (args, { argTypes }) => ({
2735
:value="value"
2836
:input-id="inputId"
2937
:required="required"
38+
:hide-label="hideLabel"
39+
:status="status"
40+
:styles="styles"
3041
@scaleChange="action('scaleChange')($event)"
3142
@scale-change="action('scale-change')($event)"
3243
></scale-checkbox>
@@ -68,9 +79,8 @@ export const Template = (args, { argTypes }) => ({
6879
```css
6980
scale-checkbox {
7081
--spacing-x: var(--telekom-spacing-composition-space-04);
71-
--transition: all var(--telekom-motion-duration-transition) var(
72-
--telekom-motion-easing-standard
73-
);
82+
--transition: all var(--telekom-motion-duration-transition)
83+
var(--telekom-motion-easing-standard);
7484
--color-text: var(--telekom-color-text-and-icon-standard);
7585
--color-error: var(--telekom-color-functional-danger-standard);
7686
--color-disabled: var(--telekom-color-text-and-icon-disabled);
@@ -255,4 +265,4 @@ scale-checkbox {
255265
></scale-icon-alert-imprint-dataprivacy>
256266
</span>
257267
</scale-checkbox>
258-
```
268+
```

packages/storybook-vue/stories/components/checkbox/ScaleCheckbox.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
:input-id="inputId"
1212
:required="required"
1313
:aria-label-checkbox="ariaLabelCheckbox"
14+
:hide-label="hideLabel"
15+
:status="status"
16+
:styles="styles"
1417
@scaleChange="scaleChange"
1518
>
1619
</scale-checkbox>
@@ -33,6 +36,9 @@ export default {
3336
required: { type: Boolean },
3437
ariaLabelCheckbox: { type: String },
3538
ariaDetailsId: { type: String },
39+
hideLabel: { type: Boolean},
40+
status: { type: String },
41+
styles: { type: String },
3642
},
3743
methods: {
3844
scaleChange($event) {

packages/storybook-vue/stories/components/chip/Chip.stories.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ import { action } from '@storybook/addon-actions';
2727
disabled: {
2828
description: `only valid for persistent type`,
2929
},
30+
ariaCheckedState :{
31+
description: ' DEPRECATED - (optional) chip aria-checked - should be derived from selected state attribute'
32+
}
3033
}}
3134
/>
3235

packages/storybook-vue/stories/components/chip/ScaleChip.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
:aria-role-title="ariaRoleTitle"
88
:disabled="disabled"
99
:styles="styles"
10+
:label="label"
11+
:dismiss-text="dismissText"
1012
@scaleChange="scaleChange"
1113
@scaleClose="scaleClose"
1214
>
@@ -26,6 +28,8 @@ export default {
2628
styles: { type: 'switch' | 'radio' | 'option' | 'menuitemreadio' | 'menuitemcheckbox' | 'checkbox', default: 'switch'},
2729
ariaRoleTitle: { type: String },
2830
ariaCheckedState: { type: Boolean },
31+
label: { type: String },
32+
dismissText: { type: String },
2933
},
3034
methods: {
3135
scaleChange($event) {

packages/storybook-vue/stories/components/data-grid/DataGrid.stories.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ import ScaleDataGrid from './ScaleDataGrid.vue';
2727
description: `(optional) Freeze header row from scrolling`,
2828
control: { type: null },
2929
},
30+
visible: {
31+
table: {
32+
type: { summary: 'boolean' },
33+
defaultValue: { summary: true },
34+
},
35+
description: `(optional) Set to false to hide table, used for nested tables to re-render upon toggle`,
36+
control: { type: null },
37+
},
3038
heading: {
3139
table: {
3240
type: { summary: 'string' },

packages/storybook-vue/stories/components/date-picker/DatePicker.stories.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ import { action } from '@storybook/addon-actions';
1919
description: `(optional) DEPRECATED - css overwrite should replace size`,
2020
control: { type: null },
2121
},
22+
popupTitle: {
23+
description: 'DEPRECATED - in v3 in favor of localization.calendarHeading'
24+
},
25+
status: {
26+
description: 'DEPRECATED - invalid should replace status'
27+
},
2228
}}
2329
/>
2430

@@ -45,6 +51,9 @@ export const Template = (args, { argTypes }) => ({
4551
:helper-text="helperText"
4652
:invalid="invalid"
4753
:placeholder="placeholder"
54+
:inner-role="innerRole"
55+
:status="status"
56+
:variant="variant"
4857
@scaleChange="scaleChange"
4958
@scale-change="scale-change"
5059
@scaleFocus="scaleFocus"

0 commit comments

Comments
 (0)