@ndla/ui 47.1.3 → 47.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/es/{Image/LazyLoadImage.js → ExpandableBox/ExpandableBox.js} +15 -32
  2. package/es/ExpandableBox/index.js +9 -0
  3. package/es/Footer/Footer.js +8 -8
  4. package/es/Footer/FooterLinks.js +6 -6
  5. package/es/Image/Image.js +5 -14
  6. package/es/Resource/storyComponents.js +67 -0
  7. package/es/index.js +1 -0
  8. package/es/locale/messages-en.js +15 -4
  9. package/es/locale/messages-nb.js +15 -4
  10. package/es/locale/messages-nn.js +15 -4
  11. package/es/locale/messages-se.js +13 -2
  12. package/es/locale/messages-sma.js +17 -6
  13. package/lib/ExpandableBox/ExpandableBox.d.ts +15 -0
  14. package/lib/{Image/LazyLoadImage.js → ExpandableBox/ExpandableBox.js} +18 -32
  15. package/lib/ExpandableBox/index.d.ts +8 -0
  16. package/lib/ExpandableBox/index.js +18 -0
  17. package/lib/Footer/Footer.d.ts +5 -9
  18. package/lib/Footer/Footer.js +8 -8
  19. package/lib/Footer/FooterLinks.d.ts +5 -9
  20. package/lib/Footer/FooterLinks.js +6 -6
  21. package/lib/Image/Image.js +5 -14
  22. package/lib/Resource/storyComponents.d.ts +12 -0
  23. package/lib/Resource/storyComponents.js +74 -0
  24. package/lib/index.d.ts +1 -0
  25. package/lib/index.js +13 -0
  26. package/lib/locale/messages-en.d.ts +13 -2
  27. package/lib/locale/messages-en.js +15 -4
  28. package/lib/locale/messages-nb.d.ts +13 -2
  29. package/lib/locale/messages-nb.js +15 -4
  30. package/lib/locale/messages-nn.d.ts +13 -2
  31. package/lib/locale/messages-nn.js +15 -4
  32. package/lib/locale/messages-se.d.ts +13 -2
  33. package/lib/locale/messages-se.js +13 -2
  34. package/lib/locale/messages-sma.d.ts +13 -2
  35. package/lib/locale/messages-sma.js +17 -6
  36. package/package.json +18 -18
  37. package/src/Breadcrumb/Breadcrumb.stories.tsx +77 -0
  38. package/src/Breadcrumb/HomeBreadcrumb.stories.tsx +57 -0
  39. package/src/ContentLoader/ContentLoader.stories.tsx +64 -0
  40. package/src/ExpandableBox/ExpandableBox.stories.tsx +34 -0
  41. package/src/ExpandableBox/ExpandableBox.tsx +21 -0
  42. package/src/ExpandableBox/index.ts +9 -0
  43. package/src/FactBox/Factbox.stories.tsx +62 -0
  44. package/src/FileList/FileList.stories.tsx +48 -0
  45. package/src/Footer/Footer.stories.tsx +116 -0
  46. package/src/Footer/Footer.tsx +5 -9
  47. package/src/Footer/FooterLinks.tsx +5 -9
  48. package/src/Image/Image.stories.tsx +63 -0
  49. package/src/Image/Image.tsx +3 -17
  50. package/src/Image/__tests__/__snapshots__/Image-test.jsx.snap +19 -10
  51. package/src/List/OrderedList.stories.tsx +114 -0
  52. package/src/List/UnorderedList.stories.tsx +46 -0
  53. package/src/Messages/MessageBanner.stories.tsx +33 -0
  54. package/src/Messages/MessageBox.stories.tsx +60 -0
  55. package/src/MyNdla/Resource/Folder.stories.tsx +31 -4
  56. package/src/MyNdla/Resource/FolderInput.stories.tsx +29 -0
  57. package/src/Resource/BlockResource.stories.tsx +51 -5
  58. package/src/Resource/ListResource.stories.tsx +98 -0
  59. package/src/Resource/storyComponents.tsx +46 -0
  60. package/src/SnackBar/Snack.stories.tsx +91 -0
  61. package/src/Table/Table.stories.tsx +701 -0
  62. package/src/index.ts +1 -0
  63. package/src/locale/messages-en.ts +12 -4
  64. package/src/locale/messages-nb.ts +15 -4
  65. package/src/locale/messages-nn.ts +15 -4
  66. package/src/locale/messages-se.ts +10 -2
  67. package/src/locale/messages-sma.ts +14 -6
  68. package/lib/Image/LazyLoadImage.d.ts +0 -17
  69. package/src/Image/LazyLoadImage.tsx +0 -37
  70. package/src/Resource/Resource.stories.tsx +0 -81
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Copyright (c) 2023-present, NDLA.
3
+ *
4
+ * This source code is licensed under the GPLv3 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import { Meta, StoryFn } from '@storybook/react';
10
+ import UnOrderedList from './UnOrderedList';
11
+
12
+ export default {
13
+ title: 'Base styles/UnorderedList',
14
+ tags: ['autodocs'],
15
+ component: UnOrderedList,
16
+ } as Meta<typeof UnOrderedList>;
17
+
18
+ export const Default: StoryFn = () => (
19
+ <UnOrderedList>
20
+ <li>Listepunkt 1</li>
21
+ <li>Listepunkt 2</li>
22
+ <li>
23
+ Listepunkt 3
24
+ <UnOrderedList>
25
+ <li>Listepunkt 1</li>
26
+ <li>Listepunkt 2</li>
27
+ <li>
28
+ Listepunkt 3
29
+ <UnOrderedList>
30
+ <li>Listepunkt 1</li>
31
+ <li>Listepunkt 2</li>
32
+ <li>
33
+ Listepunkt 3
34
+ <UnOrderedList>
35
+ <li>Listepunkt 1</li>
36
+ <li>Listepunkt 2</li>
37
+ <li>Listepunkt 3</li>
38
+ </UnOrderedList>
39
+ </li>
40
+ </UnOrderedList>
41
+ </li>
42
+ </UnOrderedList>
43
+ </li>
44
+ <li>Listepunkt 4</li>
45
+ </UnOrderedList>
46
+ );
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Copyright (c) 2023-present, NDLA.
3
+ *
4
+ * This source code is licensed under the GPLv3 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import { useTranslation } from 'react-i18next';
10
+ import { Meta, StoryFn } from '@storybook/react';
11
+ import MessageBanner from './MessageBanner';
12
+ import { defaultParameters } from '../../../../stories/defaults';
13
+
14
+ /**
15
+ * Brukes i toppen av nettleseren når noe trenger mye oppmerksomhet globalt i systemet.
16
+ */
17
+ export default {
18
+ title: 'Patterns/MessageBanner',
19
+ component: MessageBanner,
20
+ tags: ['autodocs'],
21
+ parameters: {
22
+ inlineStories: true,
23
+ ...defaultParameters,
24
+ },
25
+ args: {
26
+ showCloseButton: true,
27
+ },
28
+ } as Meta<typeof MessageBanner>;
29
+
30
+ export const Default: StoryFn<typeof MessageBanner> = ({ ...args }) => {
31
+ const { t } = useTranslation();
32
+ return <MessageBanner {...args}>{t('messageBoxInfo.updateBrowser')}</MessageBanner>;
33
+ };
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Copyright (c) 2023-present, NDLA.
3
+ *
4
+ * This source code is licensed under the GPLv3 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import { useTranslation } from 'react-i18next';
10
+ import { Meta, StoryFn } from '@storybook/react';
11
+ import MessageBox from './MessageBox';
12
+ import { defaultParameters } from '../../../../stories/defaults';
13
+
14
+ export default {
15
+ title: 'Patterns/MessageBox',
16
+ component: MessageBox,
17
+ tags: ['autodocs'],
18
+ parameters: {
19
+ inlineStories: true,
20
+ ...defaultParameters,
21
+ },
22
+ args: {
23
+ showCloseButton: true,
24
+ },
25
+ } as Meta<typeof MessageBox>;
26
+
27
+ export const Default: StoryFn<typeof MessageBox> = ({ ...args }) => {
28
+ const { t } = useTranslation();
29
+ return <MessageBox {...args}>{t('messageBoxInfo.noContent')}</MessageBox>;
30
+ };
31
+
32
+ export const WithoutCloseButton: StoryFn<typeof MessageBox> = () => {
33
+ const { t } = useTranslation();
34
+ return <MessageBox>{t('messageBoxInfo.subjectOutdated')}</MessageBox>;
35
+ };
36
+
37
+ export const WithLinks: StoryFn<typeof MessageBox> = () => {
38
+ const { t } = useTranslation();
39
+ return (
40
+ <MessageBox
41
+ links={[
42
+ { text: 'link 1', href: '#' },
43
+ { text: 'link 2', href: '#' },
44
+ { text: 'link 3', href: '#' },
45
+ ]}
46
+ >
47
+ {t('messageBoxInfo.newVersion')}
48
+ </MessageBox>
49
+ );
50
+ };
51
+
52
+ export const Ghost: StoryFn<typeof MessageBox> = () => {
53
+ const { t } = useTranslation();
54
+ return <MessageBox type="ghost">{t('messageBoxInfo.feide')}</MessageBox>;
55
+ };
56
+
57
+ export const Danger: StoryFn<typeof MessageBox> = () => {
58
+ const { t } = useTranslation();
59
+ return <MessageBox type="danger">{t('messageBoxInfo.feide')}</MessageBox>;
60
+ };
@@ -1,4 +1,14 @@
1
- import { Meta, StoryFn } from '@storybook/react';
1
+ /**
2
+ * Copyright (c) 2022-present, NDLA.
3
+ *
4
+ * This source code is licensed under the GPLv3 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import styled from '@emotion/styled';
10
+ import { Meta, StoryFn, StoryObj } from '@storybook/react';
11
+ import { spacing } from '@ndla/core';
2
12
  import { Pencil } from '@ndla/icons/action';
3
13
  import { DeleteForever } from '@ndla/icons/editor';
4
14
  import { DropdownMenu, DropdownTrigger, DropdownContent, DropdownItem } from '@ndla/dropdown-menu';
@@ -9,7 +19,7 @@ import { defaultParameters } from '../../../../../stories/defaults';
9
19
  import Folder from './Folder';
10
20
 
11
21
  export default {
12
- title: 'Components/Folder',
22
+ title: 'My NDLA/Folder',
13
23
  component: Folder,
14
24
  tags: ['autodocs'],
15
25
  parameters: {
@@ -55,6 +65,23 @@ export default {
55
65
  },
56
66
  } as Meta<typeof Folder>;
57
67
 
58
- export const FolderStory: StoryFn<typeof Folder> = (args) => {
59
- return <Folder {...args} />;
68
+ export const FolderStory: StoryObj<typeof Folder> = {};
69
+
70
+ export const WithoutMenu: StoryObj<typeof Folder> = {
71
+ args: { menu: undefined },
72
+ };
73
+
74
+ const BlockWrapper = styled.div`
75
+ display: flex;
76
+ gap: ${spacing.small};
77
+ `;
78
+
79
+ export const BlockFolder: StoryFn<typeof Folder> = (args) => {
80
+ return (
81
+ <BlockWrapper>
82
+ <Folder {...args} type="block" />
83
+ <Folder {...args} type="block" />
84
+ <Folder {...args} type="block" />
85
+ </BlockWrapper>
86
+ );
60
87
  };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Copyright (c) 2023-present, NDLA.
3
+ *
4
+ * This source code is licensed under the GPLv3 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import { Meta, StoryObj } from '@storybook/react';
10
+ import FolderInput from './FolderInput';
11
+ import { defaultParameters } from '../../../../../stories/defaults';
12
+
13
+ export default {
14
+ title: 'My NDLA/FolderInput',
15
+ tags: ['autodocs'],
16
+ component: FolderInput,
17
+ parameters: {
18
+ inlineStories: true,
19
+ ...defaultParameters,
20
+ },
21
+ args: {
22
+ labelHidden: false,
23
+ loading: false,
24
+ label: 'Create new folder',
25
+ name: 'folder',
26
+ },
27
+ } as Meta<typeof FolderInput>;
28
+
29
+ export const Default: StoryObj = {};
@@ -6,12 +6,15 @@
6
6
  *
7
7
  */
8
8
 
9
- import { Meta, StoryFn } from '@storybook/react';
9
+ import { Meta, StoryFn, StoryObj } from '@storybook/react';
10
+ import styled from '@emotion/styled';
11
+ import { spacing } from '@ndla/core';
10
12
  import { defaultParameters } from '../../../../stories/defaults';
11
13
  import BlockResource from './BlockResource';
14
+ import { StoryResourceMenu, resourceTypesArr } from './storyComponents';
12
15
 
13
16
  export default {
14
- title: 'Components/Resources/BlockResource',
17
+ title: 'My NDLA/BlockResource',
15
18
  component: BlockResource,
16
19
  tags: ['autodocs'],
17
20
  parameters: {
@@ -35,8 +38,9 @@ export default {
35
38
  id: '1234',
36
39
  link: '',
37
40
  title: 'Tittel til ressurs',
41
+ description: 'Dette er for eksempel en fagbeskrivelse! Dersom den er for lang vil den bli forkortet',
38
42
  resourceImage: {
39
- src: '',
43
+ src: 'https://cdn.pixabay.com/photo/2022/06/12/22/35/village-7258991_1280.jpg',
40
44
  alt: '',
41
45
  },
42
46
  resourceTypes: [{ id: 'urn:resourcetype:learningPath', name: 'Læringssti' }],
@@ -44,8 +48,50 @@ export default {
44
48
  },
45
49
  } as Meta<typeof BlockResource>;
46
50
 
47
- export const BlockResourceStory: StoryFn<typeof BlockResource> = (args) => {
51
+ export const WithImage: StoryFn<typeof BlockResource> = (args) => {
48
52
  return <BlockResource {...args} />;
49
53
  };
50
54
 
51
- BlockResourceStory.storyName = 'BlockResource';
55
+ export const WithoutImage: StoryObj<typeof BlockResource> = {
56
+ args: { resourceImage: { src: '', alt: '' } },
57
+ };
58
+
59
+ export const WithoutTags: StoryObj<typeof BlockResource> = {
60
+ args: { tags: [] },
61
+ };
62
+
63
+ export const WithOverflowingDescription: StoryObj<typeof BlockResource> = {
64
+ args: {
65
+ description:
66
+ 'Beskrivelser trenger ikke å være så veldig lange. Det er ganske vanskelig å få plass til en livshistorie. Det lærte jeg da jeg var ung',
67
+ },
68
+ };
69
+
70
+ export const WithMenu: StoryObj<typeof BlockResource> = {
71
+ args: {
72
+ menu: <StoryResourceMenu />,
73
+ },
74
+ };
75
+
76
+ export const Loading: StoryObj<typeof BlockResource> = {
77
+ args: {
78
+ isLoading: true,
79
+ },
80
+ };
81
+
82
+ const BlockWrapper = styled.div`
83
+ display: flex;
84
+ gap: ${spacing.small};
85
+ flex-wrap: wrap;
86
+ `;
87
+
88
+ export const BlockView: StoryObj<typeof BlockResource> = {
89
+ args: { resourceImage: { src: '', alt: '' } },
90
+ render: ({ ...args }) => (
91
+ <BlockWrapper>
92
+ {resourceTypesArr.map((rt) => (
93
+ <BlockResource {...args} key={rt.id} resourceTypes={[rt]} />
94
+ ))}
95
+ </BlockWrapper>
96
+ ),
97
+ };
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Copyright (c) 2022-present, NDLA.
3
+ *
4
+ * This source code is licensed under the GPLv3 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import styled from '@emotion/styled';
10
+ import { Meta, StoryFn, StoryObj } from '@storybook/react';
11
+ import ListResource from './ListResource';
12
+ import { defaultParameters } from '../../../../stories/defaults';
13
+ import { StoryResourceMenu, resourceTypesArr } from './storyComponents';
14
+ import { spacing } from '../../../core/src';
15
+
16
+ export default {
17
+ title: 'My NDLA/ListResource',
18
+ component: ListResource,
19
+ tags: ['autodocs'],
20
+ parameters: {
21
+ ...defaultParameters,
22
+ },
23
+ argTypes: {
24
+ resourceImage: {
25
+ control: false,
26
+ },
27
+ resourceTypes: {
28
+ control: false,
29
+ },
30
+ headingLevel: {
31
+ control: false,
32
+ },
33
+ menu: {
34
+ control: false,
35
+ },
36
+ },
37
+ args: {
38
+ id: '1234',
39
+ link: '',
40
+ title: 'Tittel til ressurs',
41
+ resourceImage: {
42
+ src: 'https://cdn.pixabay.com/photo/2022/06/12/22/35/village-7258991_1280.jpg',
43
+ alt: '',
44
+ },
45
+ resourceTypes: [{ id: 'urn:resourcetype:learningPath', name: 'Læringssti' }],
46
+ tags: ['tag', 'tag', 'tag', 'tag'],
47
+ },
48
+ } as Meta<typeof ListResource>;
49
+
50
+ export const WithImage: StoryFn<typeof ListResource> = (args) => {
51
+ return <ListResource {...args} />;
52
+ };
53
+
54
+ export const WithoutImage: StoryObj<typeof ListResource> = {
55
+ args: {
56
+ resourceImage: { src: '', alt: '' },
57
+ },
58
+ };
59
+
60
+ export const WithoutTags: StoryObj<typeof ListResource> = {
61
+ args: { tags: [] },
62
+ };
63
+
64
+ export const WithOverflowingDescription: StoryObj<typeof ListResource> = {
65
+ args: {
66
+ description:
67
+ 'Beskrivelser trenger ikke å være så veldig lange. Det er ganske vanskelig å få plass til en livshistorie. Det lærte jeg da jeg var en ung utvikler og utviklet denne komponenten. Jeg husker det nærmest som om det var i går, men det var det egentlig ikke. Det var i det gode år 2022',
68
+ },
69
+ };
70
+
71
+ export const WithMenu: StoryObj<typeof ListResource> = {
72
+ args: {
73
+ menu: <StoryResourceMenu />,
74
+ },
75
+ };
76
+
77
+ export const Loading: StoryObj<typeof ListResource> = {
78
+ args: {
79
+ isLoading: true,
80
+ },
81
+ };
82
+
83
+ const Wrapper = styled.div`
84
+ display: flex;
85
+ flex-direction: column;
86
+ gap: ${spacing.small};
87
+ `;
88
+
89
+ export const BlockView: StoryObj<typeof ListResource> = {
90
+ args: { resourceImage: { src: '', alt: '' } },
91
+ render: ({ ...args }) => (
92
+ <Wrapper>
93
+ {resourceTypesArr.map((rt) => (
94
+ <ListResource {...args} key={rt.id} resourceTypes={[rt]} />
95
+ ))}
96
+ </Wrapper>
97
+ ),
98
+ };
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Copyright (c) 2022-present, NDLA.
3
+ *
4
+ * This source code is licensed under the GPLv3 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import { DropdownMenu, DropdownTrigger, DropdownContent, DropdownItem } from '@ndla/dropdown-menu';
10
+ import { IconButtonV2, ButtonV2 } from '@ndla/button';
11
+ import { HorizontalMenu } from '@ndla/icons/contentType';
12
+ import { Pencil } from '@ndla/icons/action';
13
+ import { DeleteForever } from '@ndla/icons/editor';
14
+
15
+ export const resourceTypesArr = [
16
+ { id: 'urn:resourcetype:learningPath', name: 'Læringssti' },
17
+ { id: 'urn:resourcetype:subjectMaterial', name: 'Fagstoff' },
18
+ { id: 'urn:resourcetype:tasksAndActivities', name: 'Oppgaver og aktiviteter' },
19
+ { id: 'urn:resourcetype:reviewResource', name: 'Vurderingsressurs' },
20
+ { id: 'urn:resourcetype:externalResource', name: 'Ekstern læringsressurs' },
21
+ { id: 'urn:resourcetype:SourceMaterial', name: 'Kildemateriale' },
22
+ ];
23
+
24
+ export const StoryResourceMenu = () => (
25
+ <DropdownMenu>
26
+ <DropdownTrigger>
27
+ <IconButtonV2 aria-label="Show more" title="Show more" variant="ghost" colorTheme="light">
28
+ <HorizontalMenu />
29
+ </IconButtonV2>
30
+ </DropdownTrigger>
31
+ <DropdownContent>
32
+ <DropdownItem>
33
+ <ButtonV2 variant="ghost" colorTheme="light" shape="sharp" size="small" fontWeight="normal">
34
+ <Pencil />
35
+ Rediger
36
+ </ButtonV2>
37
+ </DropdownItem>
38
+ <DropdownItem>
39
+ <ButtonV2 variant="ghost" colorTheme="danger" shape="sharp" size="small" fontWeight="normal">
40
+ <DeleteForever />
41
+ Slett
42
+ </ButtonV2>
43
+ </DropdownItem>
44
+ </DropdownContent>
45
+ </DropdownMenu>
46
+ );
@@ -0,0 +1,91 @@
1
+ /**
2
+ * Copyright (c) 2023-present, NDLA.
3
+ *
4
+ * This source code is licensed under the GPLv3 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import { Meta, StoryObj } from '@storybook/react';
10
+ import { ButtonV2 } from '@ndla/button';
11
+ import { PersonOutlined } from '@ndla/icons/common';
12
+ import { Snack, SnackbarProvider, useSnack } from '.';
13
+ import { defaultParameters } from '../../../../stories/defaults';
14
+
15
+ const SnackComponent = ({ ...args }: Snack) => {
16
+ const { addSnack } = useSnack();
17
+ const onClick = () => {
18
+ addSnack({ ...args });
19
+ };
20
+
21
+ return (
22
+ <ButtonV2 variant="outline" onClick={onClick}>
23
+ Show snack
24
+ </ButtonV2>
25
+ );
26
+ };
27
+
28
+ export default {
29
+ title: 'Components/Snack',
30
+ tags: ['autodocs'],
31
+ parameters: {
32
+ inlineStories: true,
33
+ ...defaultParameters,
34
+ },
35
+ args: {
36
+ content: <span>This is a snack</span>,
37
+ duration: 5000,
38
+ render: undefined,
39
+ id: 'default',
40
+ icon: undefined,
41
+ closable: true,
42
+ },
43
+ argTypes: {
44
+ content: { control: false, description: 'Any JSX component, but usually a span-like element' },
45
+ render: { control: false, description: 'Replaces the entire snack with a custom render' },
46
+ icon: { control: false, description: 'An additional icon to be shown on the left-hand side of the snack' },
47
+ },
48
+ decorators: [
49
+ (Story) => (
50
+ <SnackbarProvider>
51
+ <Story />
52
+ </SnackbarProvider>
53
+ ),
54
+ ],
55
+ render: ({ ...args }) => <SnackComponent {...args} />,
56
+ } as Meta<Snack>;
57
+
58
+ export const Default: StoryObj<Snack> = {};
59
+
60
+ const CustomSnack = (snack: Snack) => {
61
+ const { closeSnack } = useSnack();
62
+ return (
63
+ <div style={{ backgroundColor: 'gray', zIndex: 1000, display: 'flex', pointerEvents: 'all' }}>
64
+ <p>Custom render!</p>
65
+ <ButtonV2 onClick={() => closeSnack(snack)}>Close</ButtonV2>
66
+ </div>
67
+ );
68
+ };
69
+
70
+ export const WithCustomRender: StoryObj<Snack> = {
71
+ args: {
72
+ id: 'customRender',
73
+ content: undefined,
74
+ duration: 2000000,
75
+ render: (id) => <CustomSnack id={id} />,
76
+ },
77
+ };
78
+
79
+ export const NotClosable: StoryObj<Snack> = {
80
+ args: {
81
+ id: 'nonClosable',
82
+ closable: false,
83
+ },
84
+ };
85
+
86
+ export const WithIcon: StoryObj<Snack> = {
87
+ args: {
88
+ id: 'customIcon',
89
+ icon: <PersonOutlined />,
90
+ },
91
+ };