-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Canvas, Story } from '@storybook/addon-docs' | ||
|
||
# eventIdAccessor | ||
|
||
- type: `string | function (event: Object) => string` | ||
- default: 'id' | ||
|
||
The id of the event. Must resolve to a string. Used as the key for the event in the DOM. If not provided, the event will be given a key of 'evt\_<index>'. | ||
|
||
<Story id="props--event-id-accessor" /> |
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,33 @@ | ||
import React from 'react' | ||
import { Calendar } from '../../src' | ||
import { accessorStoryArgs } from './storyDefaults' | ||
import mdx from './eventIdAccessor.mdx' | ||
|
||
export default { | ||
title: 'props', | ||
component: Calendar, | ||
argTypes: { | ||
localizer: { control: { type: null } }, | ||
events: { control: { type: null } }, | ||
defaultDate: { | ||
control: { | ||
type: null, | ||
}, | ||
}, | ||
}, | ||
parameters: { | ||
docs: { | ||
page: mdx, | ||
}, | ||
}, | ||
} | ||
|
||
const Template = (args) => ( | ||
<div className="height600"> | ||
<Calendar {...args} /> | ||
</div> | ||
) | ||
|
||
export const EventIdAccessor = Template.bind({}) | ||
EventIdAccessor.storyName = 'eventIdAccessor' | ||
EventIdAccessor.args = accessorStoryArgs |
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