Skip to content

Commit

Permalink
fix edit dialog stories render
Browse files Browse the repository at this point in the history
  • Loading branch information
mastercactapus committed Feb 9, 2024
1 parent 3335e57 commit 40a9cb8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
14 changes: 13 additions & 1 deletion web/src/app/users/UserContactMethodEditDialogDest.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ const meta = {
component: UserContactMethodEditDialogDest,
tags: ['autodocs'],
parameters: {
docs: {
story: {
inline: false,
iframeHeight: 500,
},
},
msw: {
handlers: [
handleDefaultConfig,
Expand Down Expand Up @@ -82,7 +88,13 @@ const meta = {
if (args.onClose) args.onClose()
setArgs({ value: '' })
}
return <UserContactMethodEditDialogDest {...args} onClose={onClose} />
return (
<UserContactMethodEditDialogDest
{...args}
disablePortal
onClose={onClose}
/>
)
},
} satisfies Meta<typeof UserContactMethodEditDialogDest>

Expand Down
3 changes: 3 additions & 0 deletions web/src/app/users/UserContactMethodEditDialogDest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ type Value = {
export default function UserContactMethodEditDialogDest({
onClose,
contactMethodID,
disablePortal,
}: {
onClose: () => void
contactMethodID: string
disablePortal?: boolean
}): React.ReactNode {
const [{ data }] = useQuery<{
userContactMethod: UserContactMethod
Expand Down Expand Up @@ -68,6 +70,7 @@ export default function UserContactMethodEditDialogDest({
<FormDialog
title='Edit Contact Method'
loading={fetching}
disablePortal={disablePortal}
errors={nonFieldErrors(error)}
onClose={onClose}
onSubmit={() => {
Expand Down

0 comments on commit 40a9cb8

Please sign in to comment.