overleaf/services/web/frontend/stories/subscription/group-invites/group-invites.stories.tsx
Antoine Clausse 4a8b79080b [storybook] Update Storybook and add a control for BS3/BS5 (#20948)
* [storybook] Update Storybook to version 8.3.5

* [storybook] Run storybook with `--no-open`. Fixes xdg-utils issue

* [storybook] Create decorator for BS3/BS5

* [storybook] Add `bsVersionDecorator` to stories

* [storybook] Fix bugs in stories

* [storybook] Fixup `useMeta` type. Use `DeepPartial`

* [storybook] Fix types

GitOrigin-RevId: 48c0f0fefb1ab2d4863ab59051b900b1908a613c
2024-10-14 11:07:40 +00:00

46 lines
1.2 KiB
TypeScript

import GroupInvites from '@/features/subscription/components/group-invites/group-invites'
import type { TeamInvite } from '../../../../types/team-invite'
import { useMeta } from '../../hooks/use-meta'
import { ScopeDecorator } from '../../decorators/scope'
import { bsVersionDecorator } from '../../../../.storybook/utils/with-bootstrap-switcher'
export const GroupInvitesDefault = () => {
const teamInvites: TeamInvite[] = [
{
email: 'email1@exammple.com',
token: 'token123',
inviterName: 'inviter1@example.com',
sentAt: new Date(),
_id: '123abc',
},
{
email: 'email2@exammple.com',
token: 'token456',
inviterName: 'inviter2@example.com',
sentAt: new Date(),
_id: '456bcd',
},
]
useMeta({ 'ol-teamInvites': teamInvites })
return (
<div className="content content-alt team-invite">
<GroupInvites />
</div>
)
}
export default {
title: 'Subscription / Group Invites',
component: GroupInvites,
args: {
show: true,
},
argTypes: {
handleHide: { action: 'close modal' },
onDisableSSO: { action: 'callback' },
...bsVersionDecorator.argTypes,
},
decorators: [ScopeDecorator],
}