insomnia/packages/insomnia-components/components/card.stories.js

139 lines
5.0 KiB
JavaScript
Raw Normal View History

2020-04-26 20:33:39 +00:00
import React from 'react';
import Card from './card';
import CardContainer from './card-container';
import { boolean, text, withKnobs } from '@storybook/addon-knobs';
import { SvgIcon } from '../index';
import { IconEnum } from './svg-icon';
export default {
title: 'Navigation | Card',
2020-04-26 20:33:39 +00:00
decorators: [withKnobs],
};
export const _default = () => (
<Card
tagLabel={text('Label', 'OpenAPI 3.0')}
docTitle={text('Title', 'Cloud OS Login')}
docVersion={text('Version', 'v2.8.4')}
docBranch={text('Branch', 'feat/small-changes')}
docLog={text('Log', '2 hours ago by gschier')}
docMenu={<SvgIcon icon={IconEnum.ellipsis} />}
/>
);
export const _selectable = () => (
<Card
tagLabel={text('Label', 'OpenAPI 3.0')}
docTitle={text('Title', 'Cloud OS Login')}
docVersion={text('Version', 'v2.8.4')}
docBranch={text('Branch', 'feat/small-changes')}
docLog={text('Log', '2 hours ago by gschier')}
docMenu={<SvgIcon icon={IconEnum.ellipsis} />}
selectable
/>
);
export const _deck = () => (
<CardContainer>
<Card
tagLabel={text('Label', 'OpenAPI 3.0')}
docTitle={text('Title', 'Cloud OS Login')}
docVersion={text('Version', 'v2.8.4')}
docBranch={text('Branch', 'feat/small-changes')}
docLog={text('Log', '2 hours ago by gschier')}
docMenu={<SvgIcon icon={IconEnum.ellipsis} />}
selectable={boolean('Selectable?', false)}
/>
<Card
tagLabel={text('Label', 'OpenAPI 3.0')}
docTitle={text('Title', 'Cloud OS Login')}
docVersion={text('Version', 'v2.8.4')}
docBranch={text('Branch', 'feat/small-changes')}
docLog={text('Log', '2 hours ago by gschier')}
docMenu={<SvgIcon icon={IconEnum.ellipsis} />}
selectable={boolean('Selectable?', false)}
/>
<Card
tagLabel={text('Label', 'OpenAPI 3.0')}
docTitle={text('Title', 'Cloud OS Login')}
docVersion={text('Version', 'v2.8.4')}
docBranch={text('Branch', 'feat/small-changes')}
docLog={text('Log', '2 hours ago by gschier')}
docMenu={<SvgIcon icon={IconEnum.ellipsis} />}
selectable={boolean('Selectable?', false)}
/>
<Card
tagLabel={text('Label', 'OpenAPI 3.0')}
docTitle={text('Title', 'Cloud OS Login')}
docVersion={text('Version', 'v2.8.4')}
docBranch={text('Branch', 'feat/small-changes')}
docLog={text('Log', '2 hours ago by gschier')}
docMenu={<SvgIcon icon={IconEnum.ellipsis} />}
selectable={boolean('Selectable?', false)}
/>
<Card
tagLabel={text('Label', 'OpenAPI 3.0')}
docTitle={text('Title', 'Cloud OS Login')}
docVersion={text('Version', 'v2.8.4')}
docBranch={text('Branch', 'feat/small-changes')}
docLog={text('Log', '2 hours ago by gschier')}
docMenu={<SvgIcon icon={IconEnum.ellipsis} />}
selectable={boolean('Selectable?', false)}
/>
<Card
tagLabel={text('Label', 'OpenAPI 3.0')}
docTitle={text('Title', 'Cloud OS Login')}
docVersion={text('Version', 'v2.8.4')}
docBranch={text('Branch', 'feat/small-changes')}
docLog={text('Log', '2 hours ago by gschier')}
docMenu={<SvgIcon icon={IconEnum.ellipsis} />}
selectable={boolean('Selectable?', false)}
/>
<Card
tagLabel={text('Label', 'OpenAPI 3.0')}
docTitle={text('Title', 'Cloud OS Login')}
docVersion={text('Version', 'v2.8.4')}
docBranch={text('Branch', 'feat/small-changes')}
docLog={text('Log', '2 hours ago by gschier')}
docMenu={<SvgIcon icon={IconEnum.ellipsis} />}
selectable={boolean('Selectable?', false)}
/>
<Card
tagLabel={text('Label', 'OpenAPI 3.0')}
docTitle={text('Title', 'Cloud OS Login')}
docVersion={text('Version', 'v2.8.4')}
docBranch={text('Branch', 'feat/small-changes')}
docLog={text('Log', '2 hours ago by gschier')}
docMenu={<SvgIcon icon={IconEnum.ellipsis} />}
selectable={boolean('Selectable?', false)}
/>
<Card
tagLabel={text('Label', 'OpenAPI 3.0')}
docTitle={text('Title', 'Cloud OS Login')}
docVersion={text('Version', 'v2.8.4')}
docBranch={text('Branch', 'feat/small-changes')}
docLog={text('Log', '2 hours ago by gschier')}
docMenu={<SvgIcon icon={IconEnum.ellipsis} />}
selectable={boolean('Selectable?', false)}
/>
<Card
tagLabel={text('Label', 'OpenAPI 3.0')}
docTitle={text('Title', 'Cloud OS Login')}
docVersion={text('Version', 'v2.8.4')}
docBranch={text('Branch', 'feat/small-changes')}
docLog={text('Log', '2 hours ago by gschier')}
docMenu={<SvgIcon icon={IconEnum.ellipsis} />}
selectable={boolean('Selectable?', false)}
/>
<Card
tagLabel={text('Label', 'OpenAPI 3.0')}
docTitle={text('Title', 'Cloud OS Login')}
docVersion={text('Version', 'v2.8.4')}
docBranch={text('Branch', 'feat/small-changes')}
docLog={text('Log', '2 hours ago by gschier')}
docMenu={<SvgIcon icon={IconEnum.ellipsis} />}
selectable={boolean('Selectable?', false)}
/>
</CardContainer>
);