Skip to content

Commit 0e63e0b

Browse files
madsrasmusseniOvergaard
authored andcommitted
docs: readonly state for toggle
1 parent c7565b9 commit 0e63e0b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

packages/uui-toggle/lib/uui-toggle.story.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export default {
1515
label: 'label',
1616
labelPosition: 'right',
1717
disabled: false,
18+
readonly: false,
1819
checked: false,
1920
'--uui-toggle-size': '18px',
2021
'--uui-toggle-switch-width': '36px',
@@ -38,6 +39,7 @@ export const AAAOverview: Story = props => html`
3839
.label=${props.label}
3940
.labelPosition=${props.labelPosition}
4041
?disabled=${props.disabled}
42+
?readonly=${props.readonly}
4143
?checked=${props.checked}
4244
>${props.slot}</uui-toggle
4345
>
@@ -150,3 +152,16 @@ Disabled.parameters = {
150152
},
151153
},
152154
};
155+
156+
export const Readonly: Story = props => html`
157+
<uui-toggle ?readonly=${props.readonly} label="Readonly" checked></uui-toggle>
158+
`;
159+
Readonly.args = { readonly: true };
160+
Readonly.parameters = {
161+
controls: { include: ['readonly'] },
162+
docs: {
163+
source: {
164+
code: `<uui-toggle readonly>Readonly</uui-toggle>`,
165+
},
166+
},
167+
};

0 commit comments

Comments
 (0)