Skip to content

Commit

Permalink
Fix types in Storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaindik committed Dec 6, 2024
1 parent 3f29e79 commit ab05a56
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ export default {
argTypes: {
hasBaseVersion: {
control: 'boolean',
description: 'Indicates whether the base version of a field is available',
description: 'Indicates whether comparisons with the base version should be shown',
defaultValue: true,
},
},
};

const Template: Story<{ hasBaseVersion: boolean }> = (args) => {
const Template: Story<{ shouldShowBaseVersion: boolean }> = (args) => {
const [selectedVersions, setSelectedVersions] = useState<SelectedVersions>(
SelectedVersions.CurrentFinal
);

return (
<VersionsPicker
hasBaseVersion={args.hasBaseVersion}
shouldShowBaseVersion={args.shouldShowBaseVersion}
selectedVersions={selectedVersions}
onChange={setSelectedVersions}
/>
Expand All @@ -38,10 +38,10 @@ const Template: Story<{ hasBaseVersion: boolean }> = (args) => {

export const Default = Template.bind({});
Default.args = {
hasBaseVersion: true,
shouldShowBaseVersion: true,
};

export const NoBaseVersion = Template.bind({});
NoBaseVersion.args = {
hasBaseVersion: false,
shouldShowBaseVersion: false,
};

0 comments on commit ab05a56

Please sign in to comment.