import { useReactiveVar } from '@apollo/client'; import { ComponentStory, ComponentMeta } from '@storybook/react'; import { SafeAreaProvider } from 'react-native-safe-area-context'; import { AlertOptionsVar, alertOptionsVar } from 'state-management/alert'; import { colors } from 'theme/color'; import { AlertWrapper } from './index'; export default { title: 'Design System/Alert', component: AlertWrapper, argTypes: { alertVariantLocal: { options: ['success', 'info', 'warning', 'error'], control: { type: 'select' }, }, variantVar: { options: ['success', 'info', 'warning', 'error'], control: { type: 'select' }, }, iconColorVariant: { options: colors, control: { type: 'select' }, }, }, } as ComponentMeta; export const Interactive: ComponentStory = (args) => { alertOptionsVar({ messageVar: 'Hello i am testing the args', isOpenVar: true, variantVar: 'info', }); const { contentVar, leftElementVar }: AlertOptionsVar = useReactiveVar(alertOptionsVar); return ( ); }; Interactive.args = { variantVar: 'info', iconColorVariant: 'title', alertVariantLocal: 'info', titleVar: 'Title', messageVar: 'I am the body of the alert', };