@transferwise/components 0.0.0-experimental-e06e456 → 0.0.0-experimental-e3978a5
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.
- package/build/index.js +2 -0
- package/build/index.js.map +1 -1
- package/build/index.mjs +1 -0
- package/build/index.mjs.map +1 -1
- package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js +56 -0
- package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js.map +1 -0
- package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs +54 -0
- package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs.map +1 -0
- package/build/listItem/AvatarLayout/ListItemAvatarLayout.js +23 -0
- package/build/listItem/AvatarLayout/ListItemAvatarLayout.js.map +1 -0
- package/build/listItem/AvatarLayout/ListItemAvatarLayout.mjs +21 -0
- package/build/listItem/AvatarLayout/ListItemAvatarLayout.mjs.map +1 -0
- package/build/listItem/AvatarView/ListItemAvatarView.js +23 -0
- package/build/listItem/AvatarView/ListItemAvatarView.js.map +1 -0
- package/build/listItem/AvatarView/ListItemAvatarView.mjs +21 -0
- package/build/listItem/AvatarView/ListItemAvatarView.mjs.map +1 -0
- package/build/listItem/Button/ListItemButton.js +43 -0
- package/build/listItem/Button/ListItemButton.js.map +1 -0
- package/build/listItem/Button/ListItemButton.mjs +41 -0
- package/build/listItem/Button/ListItemButton.mjs.map +1 -0
- package/build/listItem/Checkbox/ListItemCheckbox.js +30 -0
- package/build/listItem/Checkbox/ListItemCheckbox.js.map +1 -0
- package/build/listItem/Checkbox/ListItemCheckbox.mjs +28 -0
- package/build/listItem/Checkbox/ListItemCheckbox.mjs.map +1 -0
- package/build/listItem/IconButton/ListItemIconButton.js +56 -0
- package/build/listItem/IconButton/ListItemIconButton.js.map +1 -0
- package/build/listItem/IconButton/ListItemIconButton.mjs +54 -0
- package/build/listItem/IconButton/ListItemIconButton.mjs.map +1 -0
- package/build/listItem/Image/ListItemImage.js +31 -0
- package/build/listItem/Image/ListItemImage.js.map +1 -0
- package/build/listItem/Image/ListItemImage.mjs +29 -0
- package/build/listItem/Image/ListItemImage.mjs.map +1 -0
- package/build/listItem/ListItem.js +313 -0
- package/build/listItem/ListItem.js.map +1 -0
- package/build/listItem/ListItem.mjs +308 -0
- package/build/listItem/ListItem.mjs.map +1 -0
- package/build/listItem/ListItemContext.js +8 -0
- package/build/listItem/ListItemContext.js.map +1 -0
- package/build/listItem/ListItemContext.mjs +6 -0
- package/build/listItem/ListItemContext.mjs.map +1 -0
- package/build/listItem/Navigation/ListItemNavigation.js +44 -0
- package/build/listItem/Navigation/ListItemNavigation.js.map +1 -0
- package/build/listItem/Navigation/ListItemNavigation.mjs +42 -0
- package/build/listItem/Navigation/ListItemNavigation.mjs.map +1 -0
- package/build/listItem/Prompt/ListItemPrompt.js +59 -0
- package/build/listItem/Prompt/ListItemPrompt.js.map +1 -0
- package/build/listItem/Prompt/ListItemPrompt.mjs +54 -0
- package/build/listItem/Prompt/ListItemPrompt.mjs.map +1 -0
- package/build/listItem/Radio/ListItemRadio.js +30 -0
- package/build/listItem/Radio/ListItemRadio.js.map +1 -0
- package/build/listItem/Radio/ListItemRadio.mjs +28 -0
- package/build/listItem/Radio/ListItemRadio.mjs.map +1 -0
- package/build/listItem/Switch/ListItemSwitch.js +30 -0
- package/build/listItem/Switch/ListItemSwitch.js.map +1 -0
- package/build/listItem/Switch/ListItemSwitch.mjs +28 -0
- package/build/listItem/Switch/ListItemSwitch.mjs.map +1 -0
- package/build/listItem/useListItemControl.js +22 -0
- package/build/listItem/useListItemControl.js.map +1 -0
- package/build/listItem/useListItemControl.mjs +20 -0
- package/build/listItem/useListItemControl.mjs.map +1 -0
- package/build/listItem/useListItemMedia.js +21 -0
- package/build/listItem/useListItemMedia.js.map +1 -0
- package/build/listItem/useListItemMedia.mjs +19 -0
- package/build/listItem/useListItemMedia.mjs.map +1 -0
- package/build/main.css +771 -1
- package/build/styles/button/Button.css +1 -1
- package/build/styles/listItem/ListItem.css +770 -0
- package/build/styles/listItem/ListItem.grid.css +370 -0
- package/build/styles/main.css +771 -1
- package/build/types/index.d.ts +2 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/listItem/AdditionalInfo/ListItemAdditionalInfo.d.ts +15 -0
- package/build/types/listItem/AdditionalInfo/ListItemAdditionalInfo.d.ts.map +1 -0
- package/build/types/listItem/AdditionalInfo/index.d.ts +3 -0
- package/build/types/listItem/AdditionalInfo/index.d.ts.map +1 -0
- package/build/types/listItem/AvatarLayout/ListItemAvatarLayout.d.ts +18 -0
- package/build/types/listItem/AvatarLayout/ListItemAvatarLayout.d.ts.map +1 -0
- package/build/types/listItem/AvatarLayout/index.d.ts +3 -0
- package/build/types/listItem/AvatarLayout/index.d.ts.map +1 -0
- package/build/types/listItem/AvatarView/ListItemAvatarView.d.ts +16 -0
- package/build/types/listItem/AvatarView/ListItemAvatarView.d.ts.map +1 -0
- package/build/types/listItem/AvatarView/index.d.ts +3 -0
- package/build/types/listItem/AvatarView/index.d.ts.map +1 -0
- package/build/types/listItem/Button/ListItemButton.d.ts +20 -0
- package/build/types/listItem/Button/ListItemButton.d.ts.map +1 -0
- package/build/types/listItem/Button/index.d.ts +3 -0
- package/build/types/listItem/Button/index.d.ts.map +1 -0
- package/build/types/listItem/Checkbox/ListItemCheckbox.d.ts +14 -0
- package/build/types/listItem/Checkbox/ListItemCheckbox.d.ts.map +1 -0
- package/build/types/listItem/Checkbox/index.d.ts +3 -0
- package/build/types/listItem/Checkbox/index.d.ts.map +1 -0
- package/build/types/listItem/IconButton/ListItemIconButton.d.ts +18 -0
- package/build/types/listItem/IconButton/ListItemIconButton.d.ts.map +1 -0
- package/build/types/listItem/IconButton/index.d.ts +3 -0
- package/build/types/listItem/IconButton/index.d.ts.map +1 -0
- package/build/types/listItem/Image/ListItemImage.d.ts +25 -0
- package/build/types/listItem/Image/ListItemImage.d.ts.map +1 -0
- package/build/types/listItem/Image/index.d.ts +3 -0
- package/build/types/listItem/Image/index.d.ts.map +1 -0
- package/build/types/listItem/ListItem.d.ts +113 -0
- package/build/types/listItem/ListItem.d.ts.map +1 -0
- package/build/types/listItem/ListItemContext.d.ts +21 -0
- package/build/types/listItem/ListItemContext.d.ts.map +1 -0
- package/build/types/listItem/Navigation/ListItemNavigation.d.ts +15 -0
- package/build/types/listItem/Navigation/ListItemNavigation.d.ts.map +1 -0
- package/build/types/listItem/Navigation/index.d.ts +3 -0
- package/build/types/listItem/Navigation/index.d.ts.map +1 -0
- package/build/types/listItem/Prompt/ListItemPrompt.d.ts +16 -0
- package/build/types/listItem/Prompt/ListItemPrompt.d.ts.map +1 -0
- package/build/types/listItem/Prompt/index.d.ts +3 -0
- package/build/types/listItem/Prompt/index.d.ts.map +1 -0
- package/build/types/listItem/Radio/ListItemRadio.d.ts +14 -0
- package/build/types/listItem/Radio/ListItemRadio.d.ts.map +1 -0
- package/build/types/listItem/Radio/index.d.ts +3 -0
- package/build/types/listItem/Radio/index.d.ts.map +1 -0
- package/build/types/listItem/Switch/ListItemSwitch.d.ts +14 -0
- package/build/types/listItem/Switch/ListItemSwitch.d.ts.map +1 -0
- package/build/types/listItem/Switch/index.d.ts +3 -0
- package/build/types/listItem/Switch/index.d.ts.map +1 -0
- package/build/types/listItem/_stories/helpers.d.ts +27 -0
- package/build/types/listItem/_stories/helpers.d.ts.map +1 -0
- package/build/types/listItem/_stories/subcomponents.d.ts +18 -0
- package/build/types/listItem/_stories/subcomponents.d.ts.map +1 -0
- package/build/types/listItem/index.d.ts +14 -0
- package/build/types/listItem/index.d.ts.map +1 -0
- package/build/types/listItem/test-utils.d.ts +7 -0
- package/build/types/listItem/test-utils.d.ts.map +1 -0
- package/build/types/listItem/useListItemControl.d.ts +5 -0
- package/build/types/listItem/useListItemControl.d.ts.map +1 -0
- package/build/types/listItem/useListItemMedia.d.ts +6 -0
- package/build/types/listItem/useListItemMedia.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/button/Button.css +1 -1
- package/src/button/Button.less +1 -1
- package/src/button/Button.story.tsx +4 -9
- package/src/index.ts +15 -0
- package/src/list/List.story.tsx +13 -3
- package/src/listItem/AdditionalInfo/ListItemAdditionalInfo.spec.tsx +56 -0
- package/src/listItem/AdditionalInfo/ListItemAdditionalInfo.story.tsx +198 -0
- package/src/listItem/AdditionalInfo/ListItemAdditionalInfo.tsx +36 -0
- package/src/listItem/AdditionalInfo/index.ts +2 -0
- package/src/listItem/AvatarLayout/ListItemAvatarLayout.spec.tsx +59 -0
- package/src/listItem/AvatarLayout/ListItemAvatarLayout.story.tsx +124 -0
- package/src/listItem/AvatarLayout/ListItemAvatarLayout.tsx +27 -0
- package/src/listItem/AvatarLayout/index.ts +2 -0
- package/src/listItem/AvatarView/ListItemAvatarView.spec.tsx +75 -0
- package/src/listItem/AvatarView/ListItemAvatarView.story.tsx +339 -0
- package/src/listItem/AvatarView/ListItemAvatarView.tsx +27 -0
- package/src/listItem/AvatarView/index.ts +2 -0
- package/src/listItem/Button/ListItemButton.spec.tsx +68 -0
- package/src/listItem/Button/ListItemButton.story.tsx +473 -0
- package/src/listItem/Button/ListItemButton.tsx +56 -0
- package/src/listItem/Button/index.ts +2 -0
- package/src/listItem/Checkbox/ListItemCheckbox.spec.tsx +82 -0
- package/src/listItem/Checkbox/ListItemCheckbox.story.tsx +128 -0
- package/src/listItem/Checkbox/ListItemCheckbox.tsx +33 -0
- package/src/listItem/Checkbox/index.ts +2 -0
- package/src/listItem/IconButton/ListItemIconButton.spec.tsx +119 -0
- package/src/listItem/IconButton/ListItemIconButton.story.tsx +284 -0
- package/src/listItem/IconButton/ListItemIconButton.tsx +73 -0
- package/src/listItem/IconButton/index.ts +2 -0
- package/src/listItem/Image/ListItemImage.spec.tsx +30 -0
- package/src/listItem/Image/ListItemImage.story.tsx +80 -0
- package/src/listItem/Image/ListItemImage.tsx +46 -0
- package/src/listItem/Image/index.ts +2 -0
- package/src/listItem/ListItem.css +770 -0
- package/src/listItem/ListItem.grid.css +370 -0
- package/src/listItem/ListItem.grid.less +622 -0
- package/src/listItem/ListItem.less +421 -0
- package/src/listItem/ListItem.spec.tsx +1521 -0
- package/src/listItem/ListItem.tsx +444 -0
- package/src/listItem/ListItemContext.tsx +26 -0
- package/src/listItem/Navigation/ListItemNavigation.spec.tsx +59 -0
- package/src/listItem/Navigation/ListItemNavigation.story.tsx +112 -0
- package/src/listItem/Navigation/ListItemNavigation.tsx +39 -0
- package/src/listItem/Navigation/index.ts +2 -0
- package/src/listItem/Prompt/ListItemPrompt.spec.tsx +36 -0
- package/src/listItem/Prompt/ListItemPrompt.story.tsx +204 -0
- package/src/listItem/Prompt/ListItemPrompt.tsx +32 -0
- package/src/listItem/Prompt/index.ts +2 -0
- package/src/listItem/Radio/ListItemRadio.spec.tsx +66 -0
- package/src/listItem/Radio/ListItemRadio.story.tsx +111 -0
- package/src/listItem/Radio/ListItemRadio.tsx +33 -0
- package/src/listItem/Radio/index.ts +2 -0
- package/src/listItem/Switch/ListItemSwitch.spec.tsx +47 -0
- package/src/listItem/Switch/ListItemSwitch.story.tsx +79 -0
- package/src/listItem/Switch/ListItemSwitch.tsx +33 -0
- package/src/listItem/Switch/index.ts +2 -0
- package/src/listItem/_stories/ListItem.focus.test.story.tsx +265 -0
- package/src/listItem/_stories/ListItem.layout.test.story.tsx +354 -0
- package/src/listItem/_stories/ListItem.scenarios.story.tsx +228 -0
- package/src/listItem/_stories/ListItem.story.tsx +775 -0
- package/src/listItem/_stories/ListItem.variants.test.story.tsx +271 -0
- package/src/listItem/_stories/helpers.tsx +53 -0
- package/src/listItem/_stories/subcomponents.tsx +139 -0
- package/src/listItem/index.ts +14 -0
- package/src/listItem/test-utils.tsx +33 -0
- package/src/listItem/useListItemControl.tsx +18 -0
- package/src/listItem/useListItemMedia.tsx +16 -0
- package/src/main.css +771 -1
- package/src/main.less +1 -0
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { Title, Subtitle, Description, Stories } from '@storybook/addon-docs/blocks';
|
|
3
|
+
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
4
|
+
import { action } from 'storybook/actions';
|
|
5
|
+
import { InfoCircle, Documents } from '@transferwise/icons';
|
|
6
|
+
import { lorem10, lorem100, lorem20, lorem5 } from '../../test-utils';
|
|
7
|
+
import Modal from '../../modal';
|
|
8
|
+
import Link from '../../link';
|
|
9
|
+
import List from '../../list';
|
|
10
|
+
import Popover from '../../popover';
|
|
11
|
+
import { SnackbarConsumer, type SnackbarContextType } from '../../snackbar/SnackbarContext';
|
|
12
|
+
import SnackbarProvider from '../../snackbar/SnackbarProvider';
|
|
13
|
+
import Tooltip from '../../tooltip';
|
|
14
|
+
import { Position } from '../../common';
|
|
15
|
+
import { ListItem, type ListItemProps } from '../ListItem';
|
|
16
|
+
import { storySourceWithoutNoise } from './helpers';
|
|
17
|
+
import {
|
|
18
|
+
SB_LIST_ITEM_ADDITIONAL_INFO as INFO,
|
|
19
|
+
SB_LIST_ITEM_CONTROLS as CONTROLS,
|
|
20
|
+
SB_LIST_ITEM_MEDIA as MEDIA,
|
|
21
|
+
SB_LIST_ITEM_PROMPTS as PROMPTS,
|
|
22
|
+
} from './subcomponents';
|
|
23
|
+
|
|
24
|
+
export default {
|
|
25
|
+
component: ListItem,
|
|
26
|
+
title: 'Content/ListItem/common scenarios',
|
|
27
|
+
tags: ['autodocs'],
|
|
28
|
+
args: {
|
|
29
|
+
title: lorem5,
|
|
30
|
+
subtitle: lorem10,
|
|
31
|
+
media: MEDIA.image,
|
|
32
|
+
additionalInfo: INFO.nonInteractive,
|
|
33
|
+
prompt: PROMPTS.interactive,
|
|
34
|
+
control: CONTROLS.button,
|
|
35
|
+
},
|
|
36
|
+
parameters: {
|
|
37
|
+
docs: {
|
|
38
|
+
toc: true,
|
|
39
|
+
page: () => (
|
|
40
|
+
<>
|
|
41
|
+
<Title>Common scenarios</Title>
|
|
42
|
+
<Subtitle />
|
|
43
|
+
<Description />
|
|
44
|
+
<Stories />
|
|
45
|
+
</>
|
|
46
|
+
),
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
} satisfies Meta<ListItemProps>;
|
|
50
|
+
type Story = StoryObj<ListItemProps>;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Aside from using the main control for triggering a [Modal](?path=/docs/dialogs-modal--docs),
|
|
54
|
+
* it's also possible to toggle it via inline-button as part of the `<ListItem.AdditionalInfo>`
|
|
55
|
+
* or `<ListItem.Prompt>`.
|
|
56
|
+
*/
|
|
57
|
+
export const WithModals: Story = storySourceWithoutNoise({
|
|
58
|
+
parameters: {
|
|
59
|
+
controls: { disable: true },
|
|
60
|
+
},
|
|
61
|
+
render: function WithModals(listItemProps) {
|
|
62
|
+
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
63
|
+
|
|
64
|
+
const handleOpening = () => {
|
|
65
|
+
setIsModalOpen(true);
|
|
66
|
+
action('Modal opening')();
|
|
67
|
+
};
|
|
68
|
+
const handleClosing = () => {
|
|
69
|
+
setIsModalOpen(false);
|
|
70
|
+
action('Modal closing')();
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<List>
|
|
75
|
+
<ListItem
|
|
76
|
+
{...listItemProps}
|
|
77
|
+
control={
|
|
78
|
+
<ListItem.Button partiallyInteractive onClick={handleOpening}>
|
|
79
|
+
Open modal
|
|
80
|
+
</ListItem.Button>
|
|
81
|
+
}
|
|
82
|
+
additionalInfo={
|
|
83
|
+
<ListItem.AdditionalInfo
|
|
84
|
+
action={{ label: 'button opening a modal', onClick: handleOpening }}
|
|
85
|
+
>
|
|
86
|
+
This is additional information that contains a
|
|
87
|
+
</ListItem.AdditionalInfo>
|
|
88
|
+
}
|
|
89
|
+
prompt={
|
|
90
|
+
<ListItem.Prompt sentiment="positive">
|
|
91
|
+
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}
|
|
92
|
+
This prompt also has a <Link onClick={handleOpening}>
|
|
93
|
+
button that opens a modal
|
|
94
|
+
</Link>{' '}
|
|
95
|
+
for your convenience.
|
|
96
|
+
</ListItem.Prompt>
|
|
97
|
+
}
|
|
98
|
+
/>
|
|
99
|
+
<Modal body={lorem100} open={isModalOpen} onClose={handleClosing} />
|
|
100
|
+
</List>
|
|
101
|
+
);
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The control or inline buttons can trigger a [Popover](?path=/docs/dialogs-popover--docs).
|
|
107
|
+
*/
|
|
108
|
+
export const WithPopover: Story = {
|
|
109
|
+
parameters: {
|
|
110
|
+
controls: { disable: true },
|
|
111
|
+
},
|
|
112
|
+
render: (listItemProps) => {
|
|
113
|
+
return (
|
|
114
|
+
<List>
|
|
115
|
+
<ListItem
|
|
116
|
+
{...listItemProps}
|
|
117
|
+
control={
|
|
118
|
+
<Popover preferredPlacement={Position.BOTTOM} title={lorem5} content={lorem20}>
|
|
119
|
+
<ListItem.IconButton
|
|
120
|
+
partiallyInteractive
|
|
121
|
+
aria-label="Learn more about {enter subject here}"
|
|
122
|
+
>
|
|
123
|
+
<InfoCircle />
|
|
124
|
+
</ListItem.IconButton>
|
|
125
|
+
</Popover>
|
|
126
|
+
}
|
|
127
|
+
prompt={PROMPTS.nonInteractive}
|
|
128
|
+
/>
|
|
129
|
+
</List>
|
|
130
|
+
);
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* The control or inline buttons can trigger a [Tooltip](?path=/docs/dialogs-tooltip--docs).
|
|
136
|
+
*/
|
|
137
|
+
export const WithTooltip: Story = {
|
|
138
|
+
parameters: {
|
|
139
|
+
controls: { disable: true },
|
|
140
|
+
},
|
|
141
|
+
render: (listItemProps) => {
|
|
142
|
+
return (
|
|
143
|
+
<List>
|
|
144
|
+
<ListItem
|
|
145
|
+
{...listItemProps}
|
|
146
|
+
control={
|
|
147
|
+
<Tooltip position={Position.BOTTOM} label={lorem10}>
|
|
148
|
+
<ListItem.IconButton
|
|
149
|
+
partiallyInteractive
|
|
150
|
+
aria-label="Learn more about {enter subject here}"
|
|
151
|
+
>
|
|
152
|
+
<InfoCircle />
|
|
153
|
+
</ListItem.IconButton>
|
|
154
|
+
</Tooltip>
|
|
155
|
+
}
|
|
156
|
+
prompt={PROMPTS.nonInteractive}
|
|
157
|
+
/>
|
|
158
|
+
</List>
|
|
159
|
+
);
|
|
160
|
+
},
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* ListItem is often used as a simple copy and paste button augmented with a [Snackbar](?path=/docs/dialogs-snackbar--docs). <br />
|
|
165
|
+
*
|
|
166
|
+
* **NB** The snippet below uses a simplified example implementation of a clipboard handler,
|
|
167
|
+
* which may not be suitable or sufficient for your needs.
|
|
168
|
+
*/
|
|
169
|
+
export const CopyAndPasteWithSnackbar: Story = storySourceWithoutNoise({
|
|
170
|
+
parameters: {
|
|
171
|
+
controls: { disable: true },
|
|
172
|
+
},
|
|
173
|
+
args: {
|
|
174
|
+
prompt: undefined,
|
|
175
|
+
additionalInfo: undefined,
|
|
176
|
+
},
|
|
177
|
+
render: function CopyAndPaste(listItemProps) {
|
|
178
|
+
const title = 'Artie Choke';
|
|
179
|
+
const subtitle = 'Account holder';
|
|
180
|
+
|
|
181
|
+
const handleCopy = async (createSnackbar: SnackbarContextType['createSnackbar']) =>
|
|
182
|
+
navigator.clipboard
|
|
183
|
+
.writeText(`${subtitle}: ${title}`)
|
|
184
|
+
.catch((err) => {
|
|
185
|
+
console.error('Failed to copy text: ', err);
|
|
186
|
+
})
|
|
187
|
+
.then(() => {
|
|
188
|
+
createSnackbar({
|
|
189
|
+
text: `${subtitle} copied to clipboard.`,
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
return (
|
|
194
|
+
<List>
|
|
195
|
+
<ListItem
|
|
196
|
+
{...listItemProps}
|
|
197
|
+
title={title}
|
|
198
|
+
subtitle={subtitle}
|
|
199
|
+
inverted
|
|
200
|
+
control={
|
|
201
|
+
<SnackbarProvider>
|
|
202
|
+
<SnackbarConsumer>
|
|
203
|
+
{({ createSnackbar }) => {
|
|
204
|
+
return (
|
|
205
|
+
<ListItem.IconButton
|
|
206
|
+
aria-label={`Copy ${subtitle} to clipboard`}
|
|
207
|
+
partiallyInteractive
|
|
208
|
+
onClick={async () => handleCopy(createSnackbar)}
|
|
209
|
+
>
|
|
210
|
+
<Documents />
|
|
211
|
+
</ListItem.IconButton>
|
|
212
|
+
);
|
|
213
|
+
}}
|
|
214
|
+
</SnackbarConsumer>
|
|
215
|
+
</SnackbarProvider>
|
|
216
|
+
}
|
|
217
|
+
media={
|
|
218
|
+
<ListItem.AvatarView
|
|
219
|
+
imgSrc="../avatar-square-dude.webp"
|
|
220
|
+
profileName="John Smith"
|
|
221
|
+
size={48}
|
|
222
|
+
/>
|
|
223
|
+
}
|
|
224
|
+
/>
|
|
225
|
+
</List>
|
|
226
|
+
);
|
|
227
|
+
},
|
|
228
|
+
});
|