-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add i18n basic support to storybook #137
- Loading branch information
Showing
9 changed files
with
592 additions
and
584 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
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
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 |
---|---|---|
@@ -1,31 +1,35 @@ | ||
import DateRange from '~/components/Fields/DateRange.vue' | ||
import { bind } from '~/lib/storybook-types' | ||
import type { Meta, StoryObj } from '@storybook/vue3' | ||
import DateRange from './DateRange.vue' | ||
|
||
export default { | ||
title: 'Fields/DateRange', | ||
const meta: Meta<typeof DateRange> = { | ||
component: DateRange, | ||
} | ||
|
||
const defaultProps = { | ||
start: '01/01/01', | ||
end: '02/02/02', | ||
} | ||
export default meta | ||
type Story = StoryObj<typeof DateRange> | ||
|
||
export const Default = bind(DateRange, { | ||
...defaultProps, | ||
}) | ||
export const Default: Story = { | ||
args: { | ||
start: '01/01/01', | ||
end: '02/02/02', | ||
}, | ||
} | ||
|
||
export const DefaultStart = bind(DateRange, { | ||
...defaultProps, | ||
end: undefined, | ||
}) | ||
export const SameDay: Story = { | ||
args: { | ||
start: '01/01/01', | ||
end: '01/01/01', | ||
}, | ||
} | ||
|
||
export const DefaultEnd = bind(DateRange, { | ||
...defaultProps, | ||
start: undefined, | ||
}) | ||
export const From: Story = { | ||
args: { | ||
start: '01/01/01', | ||
}, | ||
} | ||
|
||
export const DefaultSame = bind(DateRange, { | ||
...defaultProps, | ||
end: defaultProps.start, | ||
}) | ||
export const Until: Story = { | ||
args: { | ||
end: '01/01/01', | ||
}, | ||
} |
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
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.