Skip to content

Commit

Permalink
fix: fixed labels (#17315)
Browse files Browse the repository at this point in the history
  • Loading branch information
guidari authored Sep 4, 2024
1 parent 13fe26e commit 813e69e
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions packages/react/src/components/Toggle/Toggle.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default {

export const Default = () => (
<Toggle
labelText="Toggle element label"
labelText="Label"
labelA="Off"
labelB="On"
defaultToggled
Expand All @@ -28,7 +28,7 @@ export const Default = () => (
export const SmallToggle = () => (
<Toggle
size="sm"
labelText="Toggle element label"
labelText="Label"
labelA="Off"
labelB="On"
defaultToggled
Expand All @@ -37,7 +37,14 @@ export const SmallToggle = () => (
);

export const Playground = (args) => (
<Toggle labelA="Off" labelB="On" defaultToggled id="toggle-3" {...args} />
<Toggle
labelText="Label"
labelA="Off"
labelB="On"
defaultToggled
id="toggle-3"
{...args}
/>
);

Playground.argTypes = {
Expand Down Expand Up @@ -85,9 +92,9 @@ Playground.argTypes = {

export const WithAccessibleLabels = () => (
<VStack gap={7}>
<Toggle id="toggle-4" labelText="Toggle label" />
<Toggle id="toggle-4" labelText="Label" />

<Toggle id="toggle-5" labelText="Toggle label" hideLabel />
<Toggle id="toggle-5" labelText="Label" hideLabel />

<div>
<div id="toggle-6-label" style={{ marginBlockEnd: '0.5rem' }}>
Expand Down

0 comments on commit 813e69e

Please sign in to comment.