-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add new prop showToggleOption to SteppedListContainer (#4708)
* feat: dd new prop showToggleOption to SteppedListContainer * chore: update story description Co-authored-by: Matthias Prost <[email protected]> * chore: fix changeset Co-authored-by: BABAK0T0 <[email protected]> --------- Co-authored-by: Matthias Prost <[email protected]> Co-authored-by: BABAK0T0 <[email protected]>
- Loading branch information
1 parent
2529980
commit d44d0dc
Showing
6 changed files
with
523 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@ultraviolet/plus": minor | ||
--- | ||
|
||
feat: add new prop `showToggleOption` to `SteppedListContainer` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
packages/plus/src/components/SteppedListCard/__stories__/WithoutToggleButton.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import type { StoryFn } from '@storybook/react' | ||
import { Stack, Text } from '@ultraviolet/ui' | ||
import type { ComponentProps } from 'react' | ||
import { SteppedListContainer } from '../SteppedListContainer' | ||
|
||
export const WithoutToggleButton: StoryFn< | ||
ComponentProps<typeof SteppedListContainer> | ||
> = props => ( | ||
<SteppedListContainer {...props}> | ||
<SteppedListContainer.Step | ||
stepNumber={1} | ||
subHeader={ | ||
<Text as="h3" variant="headingSmallStrong" sentiment="primary"> | ||
First step | ||
</Text> | ||
} | ||
> | ||
<Stack gap={2} direction="column"> | ||
<Text as="div" variant="body"> | ||
First step description | ||
</Text> | ||
</Stack> | ||
</SteppedListContainer.Step> | ||
<SteppedListContainer.Step | ||
stepNumber={2} | ||
subHeader={ | ||
<Text as="h3" variant="headingSmallStrong" sentiment="primary"> | ||
Second step | ||
</Text> | ||
} | ||
> | ||
<Stack gap={2} direction="column"> | ||
<Text as="div" variant="body"> | ||
Second step description | ||
</Text> | ||
</Stack> | ||
</SteppedListContainer.Step> | ||
</SteppedListContainer> | ||
) | ||
|
||
WithoutToggleButton.args = { | ||
header: 'Header', | ||
showToggleOption: false, | ||
steps: ['Start', 'First step'], | ||
} | ||
|
||
WithoutToggleButton.parameters = { | ||
docs: { | ||
description: { | ||
story: | ||
'It is possible to hide the toggle button using `showToggleOption={false}`. The default behavior is being visible.', | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.