summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-flow.min.js
blob: 7f15692817c971896948cf44c27ca28e884eae72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
!(function (a) {
  (a.languages.flow = a.languages.extend('javascript', {})),
    a.languages.insertBefore('flow', 'keyword', {
      type: [
        {
          pattern:
            /\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|any|mixed|null|void)\b/,
          alias: 'tag',
        },
      ],
    }),
    (a.languages.flow['function-variable'].pattern =
      /(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i),
    delete a.languages.flow.parameter,
    a.languages.insertBefore('flow', 'operator', {
      'flow-punctuation': { pattern: /\{\||\|\}/, alias: 'punctuation' },
    }),
    Array.isArray(a.languages.flow.keyword) ||
      (a.languages.flow.keyword = [a.languages.flow.keyword]),
    a.languages.flow.keyword.unshift(
      {
        pattern: /(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,
        lookbehind: !0,
      },
      {
        pattern:
          /(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,
        lookbehind: !0,
      }
    );
})(Prism);
d: false, }, }, shape: { control: { type: 'select', }, description: 'The link shape.', options: ['rectangle', 'square'], table: { category: 'Options', defaultValue: { summary: 'rectangle' }, }, type: { name: 'string', required: false, }, }, target: { control: { type: null, }, description: 'The link target.', type: { name: 'string', required: true, }, }, }, } as ComponentMeta<typeof ButtonLink>; const Template: ComponentStory<typeof ButtonLink> = (args) => ( <ButtonLink {...args} /> ); /** * ButtonLink Story - Primary */ export const Primary = Template.bind({}); Primary.args = { children: 'Link', kind: 'primary', target: '#', }; /** * ButtonLink Story - Secondary */ export const Secondary = Template.bind({}); Secondary.args = { children: 'Link', kind: 'secondary', target: '#', }; /** * ButtonLink Story - Tertiary */ export const Tertiary = Template.bind({}); Tertiary.args = { children: 'Link', kind: 'tertiary', target: '#', };