import type { Meta, StoryObj } from '@storybook/react-webpack5'; import { createSandboxStory, globalScope, } from '../../../.storybook/components/sandbox/SandboxEditor'; import Field from '../../Field/Field'; import PhoneNumberInput from '..'; const meta = { component: PhoneNumberInput, title: 'Forms/PhoneNumberInput', } satisfies Meta; export default meta; type Story = StoryObj; export const Sandbox = createSandboxStory({ code: `const App = () => { const [value, setValue] = React.useState('+447573135343'); return ( ); };`, scope: globalScope, }); export const Basic = { args: { searchPlaceholder: 'searchPlaceholder', placeholder: 'placeholder', selectProps: { className: 'custom-class', }, onChange: () => {}, }, } satisfies Story; export const InitialValue = () => { const initialValues = [ undefined, '+44', '+441', '+1', '+12', '+1234', '+1264', '+992', '+9999', '+99992', ]; return initialValues.map((initialValue) => ( {}} /> )); };