-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(calendar): expose in story book with default story (#3710)
* chore(calendar): expose in story book with default story * fix: grammar Co-authored-by: Aleksandr Shumilov <[email protected]> * fix: add link to DatePicker --------- Co-authored-by: Aleksandr Shumilov <[email protected]>
- Loading branch information
1 parent
47b0d54
commit 7ec7c1a
Showing
3 changed files
with
44 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React, { useState } from 'react' | ||
import type { DateOrDateRangeType } from '@toptal/picasso' | ||
import { Calendar } from '@toptal/picasso' | ||
|
||
const DefaultExample = () => { | ||
const [value, setValue] = useState<DateOrDateRangeType>(new Date()) | ||
|
||
return <Calendar value={value} onChange={setValue} /> | ||
} | ||
|
||
export default DefaultExample |
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,18 @@ | ||
import { Calendar } from '../Calendar' | ||
import PicassoBook from '~/.storybook/components/PicassoBook' | ||
|
||
const page = PicassoBook.section('Components').createPage( | ||
'Calendar', | ||
`Container for displaying data in calendar form. See even more use cases in [DatePicker](/?path=/story/forms-datepicker--datepicker). | ||
${PicassoBook.createSourceLink(__filename)} | ||
` | ||
) | ||
|
||
page.createTabChapter('Props').addComponentDocs({ | ||
component: Calendar, | ||
name: 'Calendar', | ||
}) | ||
|
||
page.createChapter().addExample('Calendar/story/Default.example.tsx', 'Default') |