Skip to content

Commit

Permalink
Improved menu cache logic
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Jul 24, 2024
1 parent 28a0e74 commit 6bff569
Show file tree
Hide file tree
Showing 48 changed files with 1,077 additions and 1,061 deletions.
3 changes: 2 additions & 1 deletion .storybook/stories/config-pages/GlobalMessage.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ const globalMessage = {
suGlobalMsgHeader: "Global Message Header",
suGlobalMsgLabel: "Global Message Label",
suGlobalMsgMessage: {
processed: "<p>Erat euismod nunc ipsum morbi tincidunt accumsan bibendum elementum mi vel leo elit urna bibendum sit metus varius leo enim ex tristique amet elit interdum.</p>",
processed:
"<p>Erat euismod nunc ipsum morbi tincidunt accumsan bibendum elementum mi vel leo elit urna bibendum sit metus varius leo enim ex tristique amet elit interdum.</p>",
},
suGlobalMsgType: "success",
suGlobalMsgLink: {
Expand Down
35 changes: 18 additions & 17 deletions .storybook/stories/elements/Accordion.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,48 +1,49 @@
import type {Meta, StoryObj} from '@storybook/react';
import Accordion from "@components/elements/accordion";
import type {Meta, StoryObj} from "@storybook/react"
import Accordion from "@components/elements/accordion"

// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
const meta: Meta<typeof Accordion> = {
title: 'Design/Elements/Accordion',
title: "Design/Elements/Accordion",
component: Accordion,
tags: ['autodocs'],
tags: ["autodocs"],
argTypes: {
button: {
control: "text"
control: "text",
},
onClick: {
table: {
disable: true,
}
},
},
buttonProps: {
table: {
disable: true,
}
},
},
panelProps: {
table: {
disable: true,
}
},
},
isVisible: {
table: {
disable: true,
}
}
}
};
},
},
},
}

export default meta;
type Story = StoryObj<typeof Accordion>;
export default meta
type Story = StoryObj<typeof Accordion>

// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
export const AccordionElement: Story = {
render: ({onClick, ...args}) => {
return <Accordion {...args}/>
return <Accordion {...args} />
},
args: {
button: "Id arcu nec vel tempus rutrum.",
children: "Mi amet tempus congue erat fusce euismod eros cursus morbi amet amet diam tristique bibendum hendrerit sed commodo quisque cursus scelerisque morbi placerat tristique magna."
children:
"Mi amet tempus congue erat fusce euismod eros cursus morbi amet amet diam tristique bibendum hendrerit sed commodo quisque cursus scelerisque morbi placerat tristique magna.",
},
};
}
24 changes: 12 additions & 12 deletions .storybook/stories/elements/Address.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import type {Meta, StoryObj} from '@storybook/react';
import Address from "@components/elements/address";
import type {Meta, StoryObj} from "@storybook/react"
import Address from "@components/elements/address"

// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
const meta: Meta<typeof Address> = {
title: 'Design/Elements/Address',
title: "Design/Elements/Address",
component: Address,
tags: ['autodocs'],
tags: ["autodocs"],
argTypes: {
singleLine: {control: "boolean"}
}
};
singleLine: {control: "boolean"},
},
}

export default meta;
type Story = StoryObj<typeof Address>;
export default meta
type Story = StoryObj<typeof Address>

// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
export const AddressElement: Story = {
Expand All @@ -26,11 +26,11 @@ export const AddressElement: Story = {
postalCode: "postal_code",
singleLine: false,
},
};
}

export const OnelineAddress: Story = {
args: {
...AddressElement.args,
singleLine: true,
}
}
},
}
32 changes: 16 additions & 16 deletions .storybook/stories/elements/Button.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from "@storybook/react"

import Button from "@components/elements/button";
import Button from "@components/elements/button"

// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
const meta: Meta<typeof Button> = {
title: 'Design/Elements/Button',
title: "Design/Elements/Button",
component: Button,
tags: ['autodocs'],
tags: ["autodocs"],
argTypes: {
href: {
description: "Link url"
description: "Link url",
},
buttonElem: {
description: "Use a <button> element",
control: "boolean"
control: "boolean",
},
big: {
description: "Big button",
control: "boolean"
control: "boolean",
},
secondary: {
description: "Secondary button style",
control: "boolean"
control: "boolean",
},
centered: {
description: "Center the button",
control: "boolean"
}
}
};
control: "boolean",
},
},
}

export default meta;
type Story = StoryObj<typeof Button>;
export default meta
type Story = StoryObj<typeof Button>

// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
export const ButtonElement: Story = {
args: {
href: "http://localhost",
children: 'Button Text',
children: "Button Text",
},
};
}
20 changes: 10 additions & 10 deletions .storybook/stories/elements/Email.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import type {Meta, StoryObj} from '@storybook/react';
import Email from "@components/elements/email";
import type {Meta, StoryObj} from "@storybook/react"
import Email from "@components/elements/email"

// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
const meta: Meta<typeof Email> = {
title: 'Design/Elements/Email',
title: "Design/Elements/Email",
component: Email,
tags: ['autodocs'],
argTypes: {}
};
tags: ["autodocs"],
argTypes: {},
}

export default meta;
type Story = StoryObj<typeof Email>;
export default meta
type Story = StoryObj<typeof Email>

// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
export const EmailElement: Story = {
args: {
email: "foo@bar.com"
email: "foo@bar.com",
},
};
}
54 changes: 27 additions & 27 deletions .storybook/stories/elements/Headers.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,93 +1,93 @@
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from "@storybook/react"

import Heading from "@components/elements/headers"

// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
const meta: Meta<typeof Heading> = {
title: 'Design/Elements/Header',
title: "Design/Elements/Header",
component: Heading,
tags: ['autodocs'],
tags: ["autodocs"],
argTypes: {
level: {
description: "Heading level for the <h#> tag",
control: {type: 'number', min: 1, max: 6}
control: {type: "number", min: 1, max: 6},
},
children: {
description: "String, markup, or JSX Element to be wrapped in the header tag"
}
}
};
description: "String, markup, or JSX Element to be wrapped in the header tag",
},
},
}

export default meta;
type Story = StoryObj<typeof Heading>;
export default meta
type Story = StoryObj<typeof Heading>

export const H1HeadingElement: Story = {
args: {
children: 'Nulla scelerisque vivamus commodo',
children: "Nulla scelerisque vivamus commodo",
level: 1,
},
};
}

export const H2HeadingElement: Story = {
args: {
children: 'Nulla scelerisque vivamus commodo',
children: "Nulla scelerisque vivamus commodo",
level: 2,
},
};
}
export const LinkedH2HeadingElement: Story = {
args: {
children: <a href="#">Nulla scelerisque vivamus commodo</a>,
level: 2,
},
};
}
export const H3HeadingElement: Story = {
args: {
children: 'Nulla scelerisque vivamus commodo',
children: "Nulla scelerisque vivamus commodo",
level: 3,
},
};
}
export const LinkedHH3HeadingElement: Story = {
args: {
children: <a href="#">Nulla scelerisque vivamus commodo</a>,
level: 3,
},
};
}

export const H4HeadingElement: Story = {
args: {
children: 'Nulla scelerisque vivamus commodo',
children: "Nulla scelerisque vivamus commodo",
level: 4,
},
};
}
export const LinkedHH4HeadingElement: Story = {
args: {
children: <a href="#">Nulla scelerisque vivamus commodo</a>,
level: 4,
},
};
}

export const H5HeadingElement: Story = {
args: {
children: 'Nulla scelerisque vivamus commodo',
children: "Nulla scelerisque vivamus commodo",
level: 5,
},
};
}
export const LinkedHH5HeadingElement: Story = {
args: {
children: <a href="#">Nulla scelerisque vivamus commodo</a>,
level: 5,
},
};
}

export const H6HeadingElement: Story = {
args: {
children: 'Nulla scelerisque vivamus commodo',
children: "Nulla scelerisque vivamus commodo",
level: 6,
},
};
}
export const LinkedHH6HeadingElement: Story = {
args: {
children: <a href="#">Nulla scelerisque vivamus commodo</a>,
level: 6,
},
};
}
20 changes: 10 additions & 10 deletions .storybook/stories/elements/Oembed.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import type {Meta, StoryObj} from '@storybook/react';
import Oembed from "@components/elements/ombed";
import type {Meta, StoryObj} from "@storybook/react"
import Oembed from "@components/elements/ombed"

// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
const meta: Meta<typeof Oembed> = {
title: 'Design/Elements/Oembed',
title: "Design/Elements/Oembed",
component: Oembed,
tags: ['autodocs'],
argTypes: {}
};
tags: ["autodocs"],
argTypes: {},
}

export default meta;
type Story = StoryObj<typeof Oembed>;
export default meta
type Story = StoryObj<typeof Oembed>

// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
export const OembedElement: Story = {
args: {
"url": "https://www.youtube.com/watch?v=9P8mASSREYM"
url: "https://www.youtube.com/watch?v=9P8mASSREYM",
},
};
}
Loading

0 comments on commit 6bff569

Please sign in to comment.