summaryrefslogtreecommitdiffstats
path: root/src/components/molecules/modals/modal.stories.tsx
blob: f6dd36404c8df7f79cd2a4ac016cc5e21443b636 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15<
import { ComponentMeta, ComponentStory } from '@storybook/react';
import Modal from './modal';

/**
 * Widget - Storybook Meta
 */
export default {
  title: 'Molecules/Modals/Modal',
  component: Modal,
  argTypes: {
    children: {
      control: {
        type: 'text',
      },
      description: 'The modal body.',
      type: {
        name: 'string',
        required: true,
      },
    },
    className: {
      control: {
        type: 'text',
      },
      description: 'Set additional classnames to the modal.',
      table: {
        category: 'Styles',
      },
      type: {
        name: 'string',
        required: false,
      },
    },
    headingClassName: {
      control: {
        type: 'text',
      },
      description: 'Set additional classnames to the modal heading.',
      table: {
        category: 'Styles',
      },
      type: {
        name: 'string',
        required: false,
      },
    },
    icon: {
      control: {
        type: 'select',
      },
      description: 'The title icon.',
      options: ['', 'cogs', 'search'],
      table: {
        category: 'Options',
      },
      type: {
        name: 'string',
        required: false,
      },
    },
    title: {
      control: {
        type: 'text',
      },
      description: 'The modal title.',
      table: {
        category: 'Options',
      },
      type: {
        name: 'string',
        required: false,
      },
    },
  },
} as ComponentMeta<typeof Modal>;

const Template: ComponentStory<typeof Modal> = (args) => <Modal {...args} />;

/**
 * Modal Stories - Default
 */
export const Default = Template.bind({});
Default.args = {
  children:
    'Inventore natus dignissimos aut illum modi asperiores. Et voluptatibus delectus.',
};

/**
 * Modal Stories - With title
 */
export const WithTitle = Template.bind({});
WithTitle.args = {
  children:
    'Inventore natus dignissimos aut illum modi asperiores. Et voluptatibus delectus.',
  title: 'Alias praesentium corporis',
};
n class="w"> /(^[\t ]*|\[)(?:Safe_Base|Tcl|after|append|apply|array|auto_(?:execok|import|load|mkindex|qualify|reset)|automkindex_old|bgerror|binary|catch|cd|chan|clock|close|concat|dde|dict|encoding|eof|exec|expr|fblocked|fconfigure|fcopy|file(?:event|name)?|flush|gets|glob|history|http|incr|info|interp|join|lappend|lassign|lindex|linsert|list|llength|load|lrange|lrepeat|lreplace|lreverse|lsearch|lset|lsort|math(?:func|op)|memory|msgcat|namespace|open|package|parray|pid|pkg_mkIndex|platform|puts|pwd|re_syntax|read|refchan|regexp|registry|regsub|rename|scan|seek|set|socket|source|split|string|subst|tcl(?:_endOfWord|_findLibrary|startOf(?:Next|Previous)Word|test|vars|wordBreak(?:After|Before))|tell|time|tm|trace|unknown|unload|unset|update|uplevel|vwait)\b/m, lookbehind: !0, }, operator: /!=?|\*\*?|==|&&?|\|\|?|<[=<]?|>[=>]?|[-+~\/%?^]|\b(?:eq|in|ne|ni)\b/, punctuation: /[{}()\[\]]/, };