import React from 'react'; import { StoryFn, Meta } from '@storybook/react'; import { useArgs } from '@storybook/client-api'; import { ButtonVariant, Button } from '../../../components/component-library'; import SmartTransactionPopover from './smart-transactions-popover'; export default { title: 'Pages/Swaps/SmartTransactionsPopover', component: SmartTransactionPopover, argTypes: { isShowingModal: { control: 'boolean', }, }, } as Meta; export const DefaultStory: StoryFn = () => { const [{ isShowingModal }, updateArgs] = useArgs(); const toggleModal = () => updateArgs({ isShowingModal: !isShowingModal }); return ( <> {isShowingModal && ( { console.log('onEnableSmartTransactionsClick'); }} onCloseSmartTransactionsOptInPopover={toggleModal} /> )} ); }; DefaultStory.storyName = 'Default';