Migrate ResetSessionNotification to Storybook
This commit is contained in:
parent
58db34c5e8
commit
812b1c5b21
3 changed files with 21 additions and 8 deletions
|
@ -1,7 +0,0 @@
|
||||||
### End session
|
|
||||||
|
|
||||||
```js
|
|
||||||
<util.ConversationContext theme={util.theme}>
|
|
||||||
<ResetSessionNotification i18n={util.i18n} />
|
|
||||||
</util.ConversationContext>
|
|
||||||
```
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
import * as React from 'react';
|
||||||
|
|
||||||
|
import { storiesOf } from '@storybook/react';
|
||||||
|
|
||||||
|
import { ResetSessionNotification } from './ResetSessionNotification';
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
import { setup as setupI18n } from '../../../js/modules/i18n';
|
||||||
|
// @ts-ignore
|
||||||
|
import enMessages from '../../../_locales/en/messages.json';
|
||||||
|
const i18n = setupI18n('en', enMessages);
|
||||||
|
|
||||||
|
const story = storiesOf(
|
||||||
|
'Components/Conversation/ResetSessionNotification',
|
||||||
|
module
|
||||||
|
);
|
||||||
|
|
||||||
|
story.add('Notification', () => {
|
||||||
|
return <ResetSessionNotification i18n={i18n} />;
|
||||||
|
});
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||||
|
|
||||||
import { LocalizerType } from '../../types/Util';
|
import { LocalizerType } from '../../types/Util';
|
||||||
|
|
||||||
interface Props {
|
export interface Props {
|
||||||
i18n: LocalizerType;
|
i18n: LocalizerType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue