-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(TMRS-482): add story and linting
- Loading branch information
1 parent
f83f693
commit 29db9e2
Showing
5 changed files
with
44 additions
and
12 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
30 changes: 30 additions & 0 deletions
30
packages/ts-components/src/components/categorised-articles/CategorisedArticles.stories.tsx
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,30 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import { TrackingContextProvider } from '../../helpers/tracking/TrackingContextProvider'; | ||
import previewData from '../../fixtures/preview-data/recommended-articles'; | ||
import analyticsStream from '../../fixtures/analytics-actions/analytics-actions'; | ||
import { CategorisedArticles } from './CategorisedArticles'; | ||
|
||
storiesOf('Typescript Component/Categorised Articles', module) | ||
.add('Categorised Articles - 1 Article', () => ( | ||
<TrackingContextProvider | ||
context={{ | ||
component: 'ArticleSkeleton', | ||
object: 'CategorisedArticles', | ||
attrs: { | ||
event_navigation_action: 'navigation', | ||
event_navigation_name: 'widget:relevant article', | ||
event_navigation_browsing_method: 'click', | ||
section_details: 'section : <section>', | ||
article_name: '<headline>', | ||
widget_headline: '<headline>', | ||
widget_section: '<section>', | ||
widget_type: "today's section" | ||
} | ||
}} | ||
analyticsStream={analyticsStream} | ||
> | ||
<CategorisedArticles heading="News" articles={previewData.recommendations.articles} /> | ||
</TrackingContextProvider> | ||
)); | ||
|
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