import React, { useState } from 'react'; import { ComponentStory, ComponentMeta } from '@storybook/react'; import { OPMessage, OPButton } from '../../src/index'; export default { title: '组件/反馈/OPMessage', component: OPMessage, } as ComponentMeta; export const 信息: ComponentStory = (): JSX.Element => { const [visible, setVisible] = useState(false); const [visible2, setVisible2] = useState(false); return (
{ setVisible(true); }} > 成功 { setVisible2(true); }} > 警告
); };