You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

IFramePage.stories.tsx 1.3 kB

12345678910111213141516171819202122232425262728293031
  1. import IFramePage, { IframePageType } from '@/components/IFramePage';
  2. import type { Meta, StoryObj } from '@storybook/react';
  3. // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
  4. const meta = {
  5. title: 'Components/IFramePage iframe 页面',
  6. component: IFramePage,
  7. parameters: {
  8. // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
  9. // layout: 'centered',
  10. },
  11. // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
  12. tags: ['autodocs'],
  13. // More on argTypes: https://storybook.js.org/docs/api/argtypes
  14. argTypes: {
  15. type: { control: 'select', options: Object.values(IframePageType) },
  16. },
  17. // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
  18. // args: { onClick: fn() },
  19. } satisfies Meta<typeof IFramePage>;
  20. export default meta;
  21. type Story = StoryObj<typeof meta>;
  22. // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
  23. export const Primary: Story = {
  24. args: {
  25. type: IframePageType.GitLink,
  26. style: { height: '500px' },
  27. },
  28. };