mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-14 13:46:55 +03:00
727d753081
* stash * and those * stash * stash * stash * stash * tests * fix errors * revert * stash * fix lint * prettier
54 lines
1.1 KiB
TypeScript
54 lines
1.1 KiB
TypeScript
import React from 'react';
|
|
import styled from 'styled-components';
|
|
import { Story } from '@storybook/react';
|
|
import Tabs from './';
|
|
import { tabs, simple10Tabs } from './data';
|
|
import { TabsProps } from './Tabs';
|
|
|
|
const Container = styled.div`
|
|
display: flex;
|
|
height: 100%;
|
|
width: 100%;
|
|
justify-content: center;
|
|
align-items: center;
|
|
`;
|
|
|
|
export default {
|
|
title: 'Tabs',
|
|
component: Tabs,
|
|
};
|
|
|
|
const Template: Story<TabsProps<unknown>> = (args) => (
|
|
<Container>
|
|
<Tabs {...args} />
|
|
</Container>
|
|
);
|
|
|
|
export const Default = Template.bind({});
|
|
Default.args = {
|
|
tabs: simple10Tabs,
|
|
selected: '2',
|
|
main: true,
|
|
collapsible: true,
|
|
position: 'left',
|
|
};
|
|
Default.argTypes = {
|
|
tabs: { control: { disable: true } },
|
|
onClick: { control: { disable: true } },
|
|
};
|
|
|
|
export const WithContent = (Template as Story<
|
|
TabsProps<{ selected: string }>
|
|
>).bind({});
|
|
WithContent.args = {
|
|
tabs,
|
|
selected: 'Tab2',
|
|
main: false,
|
|
collapsible: false,
|
|
position: 'left',
|
|
};
|
|
WithContent.argTypes = {
|
|
tabs: { control: { disable: true } },
|
|
onClick: { control: { disable: true } },
|
|
};
|