import React from 'react'; import { StoryFn, Meta } from '@storybook/react'; import { useArgs } from '@storybook/client-api'; import { BUTTON_VARIANT, Button } from '../../../components/component-library'; import { SLIPPAGE_HIGH_ERROR } from '../../../../shared/constants/swaps'; import SlippageNotificationModal from './slippage-notification-modal'; export default { title: 'Pages/Swaps/SlippageNotificationModal', component: SlippageNotificationModal, argTypes: { isShowingModal: { control: 'boolean', }, }, } as Meta; export const DefaultStory: StoryFn = () => { const [{ isShowingModal }, updateArgs] = useArgs(); const toggleModal = () => updateArgs({ isShowingModal: !isShowingModal }); return ( <> {isShowingModal && ( { console.log('onSwapSubmit'); }} currentSlippage={10} setSlippageNotificationModalOpened={toggleModal} /> )} ); }; DefaultStory.storyName = 'Default';