-
Notifications
You must be signed in to change notification settings - Fork 45
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
31c28bd
commit ebf5a42
Showing
2 changed files
with
71 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,46 @@ | ||
import { createStore } from '@reduxjs/toolkit'; | ||
import { Meta, Story } from '@storybook/react/types-6-0'; | ||
import { Provider } from 'react-redux'; | ||
import { MemoryRouter } from 'react-router-dom'; | ||
import FooterComponent from './Footer'; | ||
|
||
export default { | ||
title: 'Footer', | ||
component: FooterComponent, | ||
argTypes: {}, | ||
decorators: [ | ||
Story => { | ||
return ( | ||
<MemoryRouter> | ||
<Story /> | ||
</MemoryRouter> | ||
); | ||
}, | ||
], | ||
} as Meta; | ||
|
||
const Template: Story = args => { | ||
// eslint-disable-next-line no-unused-vars | ||
const store = createStore((state = { config: {} }, action) => state, { | ||
config: { | ||
...args, | ||
}, | ||
}); | ||
return ( | ||
<Provider store={store}> | ||
<FooterComponent /> | ||
</Provider> | ||
); | ||
}; | ||
|
||
export const FooterNoOverride = Template.bind({}); | ||
FooterNoOverride.args = { | ||
title: '', | ||
nebraska_version: '', | ||
}; | ||
|
||
export const FooterOverride = Template.bind({}); | ||
FooterOverride.args = { | ||
title: 'Some Pro Update Service', | ||
nebraska_version: '1.2.3', | ||
}; |
25 changes: 25 additions & 0 deletions
25
frontend/src/components/__snapshots__/Footer.stories.storyshot
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,25 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Storyshots Footer Footer No Override 1`] = ` | ||
<div | ||
id="root" | ||
> | ||
<div | ||
class="MuiBox-root MuiBox-root" | ||
> | ||
Nebraska | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`Storyshots Footer Footer Override 1`] = ` | ||
<div | ||
id="root" | ||
> | ||
<div | ||
class="MuiBox-root MuiBox-root" | ||
> | ||
Some Pro Update Service 1.2.3 | ||
</div> | ||
</div> | ||
`; |