-
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.
- Loading branch information
Showing
1 changed file
with
45 additions
and
24 deletions.
There are no files selected for viewing
69 changes: 45 additions & 24 deletions
69
src/components/TimelineActionCard/TimelineActionCard.stories.mdx
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,41 +1,62 @@ | ||
import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks'; | ||
import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs/blocks'; | ||
import TimelineActionCard from "./TimelineActionCard"; | ||
|
||
<Meta | ||
title="Components/TimelineActionCard" | ||
component={TimelineActionCard} | ||
argTypes={{ | ||
datetime: { | ||
control: { | ||
type: "date" | ||
} | ||
}, | ||
content: { | ||
control: { | ||
type: "object" | ||
} | ||
} | ||
}} | ||
/> | ||
|
||
Renders a card like view for an action with free form text content like an Edit or Reply. | ||
|
||
<Meta title="Components/TimelineActionCard" component={TimelineActionCard}/> | ||
|
||
# Edit | ||
|
||
<Canvas> | ||
<Story name="Edit" args={{ | ||
type:"edit", | ||
datetime:"2020-06-23T13:27:56", | ||
by:"campb303", | ||
content:[ | ||
"This be an edit my boy\n" | ||
] | ||
}}> | ||
{args => <TimelineActionCard {...args} />} | ||
<Story | ||
name="Edit" | ||
args={{ | ||
type:"edit", | ||
datetime:"2020-06-23T13:27:56", | ||
by:"campb303", | ||
content:[ | ||
"This be an edit my boy\n" | ||
] | ||
}} | ||
> | ||
{ args => <TimelineActionCard {...args} /> } | ||
</Story> | ||
</Canvas> | ||
|
||
# Reply | ||
|
||
<Canvas> | ||
<Story name="Reply to User" args={{ | ||
type:"reply_to_user", | ||
datetime:"2020-06-23T13:28:18", | ||
by:"campb303", | ||
content:[ | ||
"This be a reply my son\n", | ||
"\n", | ||
"Justin\n", | ||
"ECN\n" | ||
] | ||
}}> | ||
{args => <TimelineActionCard {...args} />} | ||
<Story | ||
name="Reply to User" | ||
args={{ | ||
type:"reply_to_user", | ||
datetime:"2020-06-23T13:28:18", | ||
by:"campb303", | ||
content:[ | ||
"This be a reply my son\n", | ||
"\n", | ||
"Justin\n", | ||
"ECN\n" | ||
] | ||
}} | ||
> | ||
{ args => <TimelineActionCard {...args} /> } | ||
</Story> | ||
</Canvas> | ||
|
||
<ArgsTable of={TimelineActionCard} /> |