This repository has been archived by the owner on May 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
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
1 parent
96473fb
commit a404666
Showing
5 changed files
with
22 additions
and
22 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 |
---|---|---|
@@ -1,20 +1,20 @@ | ||
import { Loading, Empty, Failure, Success } from './ArticleCell' | ||
import { standard } from './ArticleCell.mock' | ||
|
||
export const loading = () => { | ||
return Loading ? <Loading /> : null | ||
export const loading = (args) => { | ||
return Loading ? <Loading {...args} /> : null | ||
} | ||
|
||
export const empty = () => { | ||
return Empty ? <Empty /> : null | ||
export const empty = (args) => { | ||
return Empty ? <Empty {...args} /> : null | ||
} | ||
|
||
export const failure = () => { | ||
return Failure ? <Failure error={new Error('Oh no')} /> : null | ||
export const failure = (args) => { | ||
return Failure ? <Failure {...args} error={new Error('Oh no')} /> : null | ||
} | ||
|
||
export const success = () => { | ||
return Success ? <Success {...standard()} /> : null | ||
export const success = (args) => { | ||
return Success ? <Success {...args} {...standard()} /> : null | ||
} | ||
|
||
export default { title: 'Cells/ArticleCell' } |
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,20 +1,20 @@ | ||
import { Loading, Empty, Failure, Success } from './ArticlesCell' | ||
import { standard } from './ArticlesCell.mock' | ||
|
||
export const loading = () => { | ||
return Loading ? <Loading /> : null | ||
export const loading = (args) => { | ||
return Loading ? <Loading {...args} /> : null | ||
} | ||
|
||
export const empty = () => { | ||
return Empty ? <Empty /> : null | ||
export const empty = (args) => { | ||
return Empty ? <Empty {...args} /> : null | ||
} | ||
|
||
export const failure = () => { | ||
return Failure ? <Failure error={new Error('Oh no')} /> : null | ||
export const failure = (args) => { | ||
return Failure ? <Failure error={new Error('Oh no')} {...args} /> : null | ||
} | ||
|
||
export const success = () => { | ||
return Success ? <Success {...standard()} /> : null | ||
export const success = (args) => { | ||
return Success ? <Success {...standard()} {...args} /> : null | ||
} | ||
|
||
export default { title: 'Cells/ArticlesCell' } |
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,7 +1,7 @@ | ||
import ArticlePage from './ArticlePage' | ||
|
||
export const generated = () => { | ||
return <ArticlePage /> | ||
export const generated = (arg) => { | ||
return <ArticlePage {...arg} /> | ||
} | ||
|
||
export default { title: 'Pages/ArticlePage' } |