import React from 'react'; import PropTypes from 'prop-types'; import { Tabs, Radio } from 'antd'; import { ComponentStory, ComponentMeta } from '@storybook/react'; const { TabPane } = Tabs; class TabsExample extends React.Component { constructor(props) { super(props); this.state = { size: 'small' }; } onChange = e => { this.setState({ size: e.target.value }); }; render() { const { size } = this.state; const { type } = this.props; return (
Small Default Large Content of card tab 1 Content of card tab 2 Content of card tab 3
); } } export default { title: 'example/Tabs', component: Tabs, } as ComponentMeta; const Template: ComponentStory = args => ; export const Card = Template.bind({}); Card.args = { type: 'card' }; export const Basic = Template.bind({}); Basic.args = { type: '' }; TabsExample.propTypes = { type: PropTypes.string, }; TabsExample.defaultProps = { type: '', };