simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 1 | import { Box, Chip, Divider, List, ListItemButton, ListItemText, Stack, Tooltip, Typography } from '@mui/material'; |
| 2 | import { styled } from '@mui/material/styles'; |
| 3 | import dayjs from 'dayjs'; |
| 4 | import isToday from 'dayjs/plugin/isToday'; |
| 5 | import isYesterday from 'dayjs/plugin/isYesterday'; |
| 6 | import React, { useCallback, useMemo, useState } from 'react'; |
| 7 | import { useTranslation } from 'react-i18next'; |
| 8 | import { EmojiButton, MoreButton, ReplyMessageButton } from './buttons'; |
| 9 | import ConversationAvatar from './ConversationAvatar'; |
| 10 | import { OppositeArrowsIcon, TrashBinIcon, TwoSheetsIcon } from './svgIcons'; |
Larbi Gharib | e9af973 | 2021-03-31 15:08:01 +0100 | [diff] [blame] | 11 | |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 12 | dayjs.extend(isToday); |
| 13 | dayjs.extend(isYesterday); |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 14 | |
| 15 | export const MessageCall = (props) => { |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 16 | return <Stack alignItems="center">"Appel"</Stack>; |
| 17 | }; |
Larbi Gharib | e9af973 | 2021-03-31 15:08:01 +0100 | [diff] [blame] | 18 | |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 19 | export const MessageInitial = (props) => { |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 20 | const { t } = useTranslation(); |
| 21 | return <Stack alignItems="center">{t('message_swarm_created')}</Stack>; |
| 22 | }; |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 23 | |
| 24 | export const MessageDataTransfer = (props) => { |
| 25 | return ( |
| 26 | <MessageBubble |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 27 | backgroundColor={'#E5E5E5'} |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 28 | position={props.position} |
| 29 | isFirstOfGroup={props.isFirstOfGroup} |
| 30 | isLastOfGroup={props.isLastOfGroup} |
| 31 | > |
| 32 | "data-transfer" |
| 33 | </MessageBubble> |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 34 | ); |
| 35 | }; |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 36 | |
| 37 | export const MessageMember = (props) => { |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 38 | const { t } = useTranslation(); |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 39 | return ( |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 40 | <Stack alignItems="center"> |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 41 | <Chip |
| 42 | sx={{ |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 43 | width: 'fit-content', |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 44 | }} |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 45 | label={t('message_user_joined', { user: props.message.author })} |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 46 | /> |
| 47 | </Stack> |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 48 | ); |
| 49 | }; |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 50 | |
| 51 | export const MessageMerge = (props) => { |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 52 | return <Stack alignItems="center">"merge"</Stack>; |
| 53 | }; |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 54 | |
| 55 | export const MessageText = (props) => { |
| 56 | return ( |
| 57 | <MessageBubble |
| 58 | backgroundColor={props.bubbleColor} |
| 59 | position={props.position} |
| 60 | isFirstOfGroup={props.isFirstOfGroup} |
| 61 | isLastOfGroup={props.isLastOfGroup} |
| 62 | > |
idillon | 89720a8 | 2022-09-06 18:47:05 -0400 | [diff] [blame] | 63 | <Typography variant="body1" color={props.textColor} textAlign={props.position}> |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 64 | {props.message.body} |
| 65 | </Typography> |
| 66 | </MessageBubble> |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 67 | ); |
| 68 | }; |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 69 | |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 70 | export const MessageDate = ({ time }) => { |
| 71 | let textDate; |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 72 | |
| 73 | if (time.isToday()) { |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 74 | textDate = 'Today'; |
| 75 | } else if (time.isYesterday()) { |
| 76 | textDate = 'Yesterday'; |
| 77 | } else { |
| 78 | const date = time.date().toString().padStart(2, '0'); |
| 79 | const month = (time.month() + 1).toString().padStart(2, '0'); |
| 80 | textDate = `${date}/${month}/${time.year()}`; |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 81 | } |
| 82 | |
| 83 | return ( |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 84 | <Box marginTop="30px"> |
idillon | 04245a1 | 2022-09-01 11:12:17 -0400 | [diff] [blame] | 85 | <Divider |
| 86 | sx={{ |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 87 | '.MuiDivider-wrapper': { |
idillon | 04245a1 | 2022-09-01 11:12:17 -0400 | [diff] [blame] | 88 | margin: 0, |
| 89 | padding: 0, |
| 90 | }, |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 91 | '&::before': { |
| 92 | borderTop: '1px solid #E5E5E5', |
idillon | 04245a1 | 2022-09-01 11:12:17 -0400 | [diff] [blame] | 93 | }, |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 94 | '&::after': { |
| 95 | borderTop: '1px solid #E5E5E5', |
idillon | 04245a1 | 2022-09-01 11:12:17 -0400 | [diff] [blame] | 96 | }, |
| 97 | }} |
| 98 | > |
| 99 | <Typography |
| 100 | variant="caption" |
| 101 | fontWeight={700} |
| 102 | border="1px solid #E5E5E5" |
| 103 | borderRadius="5px" |
| 104 | padding="10px 16px" |
| 105 | > |
| 106 | {textDate} |
| 107 | </Typography> |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 108 | </Divider> |
| 109 | </Box> |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 110 | ); |
| 111 | }; |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 112 | |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 113 | export const MessageTime = ({ time, hasDateOnTop }) => { |
| 114 | const hour = time.hour().toString().padStart(2, '0'); |
| 115 | const minute = time.minute().toString().padStart(2, '0'); |
| 116 | const textTime = `${hour}:${minute}`; |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 117 | |
| 118 | return ( |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 119 | <Stack direction="row" justifyContent="center" margin="30px" marginTop={hasDateOnTop ? '20px' : '30px'}> |
| 120 | <Typography variant="caption" color="#A7A7A7" fontWeight={700}> |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 121 | {textTime} |
| 122 | </Typography> |
| 123 | </Stack> |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 124 | ); |
| 125 | }; |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 126 | |
| 127 | export const MessageBubblesGroup = (props) => { |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 128 | const isUser = false; // should access user from the store |
| 129 | const position = isUser ? 'end' : 'start'; |
| 130 | const bubbleColor = isUser ? '#005699' : '#E5E5E5'; |
| 131 | const textColor = isUser ? 'white' : 'black'; |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 132 | |
| 133 | return ( |
idillon | 89720a8 | 2022-09-06 18:47:05 -0400 | [diff] [blame] | 134 | <Stack // Row for a group of message bubbles with the user's infos |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 135 | direction="row" |
| 136 | justifyContent={position} |
idillon | 89720a8 | 2022-09-06 18:47:05 -0400 | [diff] [blame] | 137 | alignItems="end" |
| 138 | spacing="10px" |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 139 | > |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 140 | {!isUser && ( |
| 141 | <ConversationAvatar displayName="TempDisplayName" sx={{ width: '22px', height: '22px', fontSize: '15px' }} /> |
| 142 | )} |
idillon | 89720a8 | 2022-09-06 18:47:05 -0400 | [diff] [blame] | 143 | <Stack // Container to align the bubbles to the same side of a row |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 144 | width="66.66%" |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 145 | alignItems={position} |
| 146 | > |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 147 | <ParticipantName name={props.messages[0]?.author} position={position} /> |
idillon | 89720a8 | 2022-09-06 18:47:05 -0400 | [diff] [blame] | 148 | <Stack // Container for a group of message bubbles |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 149 | spacing="6px" |
| 150 | alignItems={position} |
| 151 | direction="column-reverse" |
| 152 | > |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 153 | {props.messages.map((message, index) => { |
| 154 | let Component; |
| 155 | switch (message.type) { |
| 156 | case 'text/plain': |
| 157 | Component = MessageText; |
| 158 | break; |
| 159 | case 'application/data-transfer+json': |
| 160 | Component = MessageDataTransfer; |
| 161 | break; |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 162 | } |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 163 | return ( |
| 164 | <Component // Single message |
| 165 | key={message.id} |
| 166 | message={message} |
| 167 | textColor={textColor} |
| 168 | position={position} |
| 169 | bubbleColor={bubbleColor} |
| 170 | isFirstOfGroup={index == props.messages.length - 1} |
| 171 | isLastOfGroup={index == 0} |
| 172 | /> |
| 173 | ); |
| 174 | })} |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 175 | </Stack> |
| 176 | </Stack> |
| 177 | </Stack> |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 178 | ); |
| 179 | }; |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 180 | |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 181 | const MessageTooltip = styled(({ className, ...props }) => { |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 182 | const [open, setOpen] = useState(false); |
| 183 | const emojis = ['😎', '😄', '😍']; // Should be last three used emojis |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 184 | const additionalOptions = [ |
| 185 | { |
| 186 | Icon: TwoSheetsIcon, |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 187 | text: 'Copy', |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 188 | action: () => {}, |
| 189 | }, |
| 190 | { |
| 191 | Icon: OppositeArrowsIcon, |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 192 | text: 'Transfer', |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 193 | action: () => {}, |
| 194 | }, |
| 195 | { |
| 196 | Icon: TrashBinIcon, |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 197 | text: 'Delete message', |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 198 | action: () => {}, |
| 199 | }, |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 200 | ]; |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 201 | |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 202 | const toggleMoreMenu = useCallback(() => setOpen((open) => !open), [setOpen]); |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 203 | |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 204 | const onClose = useCallback(() => { |
| 205 | setOpen(false); |
| 206 | }, [setOpen]); |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 207 | |
| 208 | return ( |
| 209 | <Tooltip |
| 210 | {...props} |
| 211 | classes={{ tooltip: className }} // Required for styles. Don't know why |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 212 | placement={props.position == 'start' ? 'right-start' : 'left-start'} |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 213 | PopperProps={{ |
| 214 | modifiers: [ |
| 215 | { |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 216 | name: 'offset', |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 217 | options: { |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 218 | offset: [-2, -30], |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 219 | }, |
| 220 | }, |
| 221 | ], |
| 222 | }} |
| 223 | onClose={onClose} |
| 224 | title={ |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 225 | <Stack> |
| 226 | {' '} |
| 227 | {/* Whole tooltip's content */} |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 228 | <Stack // Main options |
| 229 | direction="row" |
| 230 | spacing="16px" |
| 231 | > |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 232 | {emojis.map((emoji) => ( |
| 233 | <EmojiButton key={emoji} emoji={emoji} /> |
| 234 | ))} |
| 235 | <ReplyMessageButton /> |
| 236 | <MoreButton onClick={toggleMoreMenu} /> |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 237 | </Stack> |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 238 | {open && ( // Additional menu options |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 239 | <> |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 240 | <Divider sx={{ paddingTop: '16px' }} /> |
| 241 | <List sx={{ padding: 0, paddingTop: '8px', marginBottom: '-8px' }}> |
| 242 | {additionalOptions.map((option) => ( |
| 243 | <ListItemButton |
| 244 | key={option.text} |
| 245 | sx={{ |
| 246 | padding: '8px', |
| 247 | }} |
| 248 | > |
| 249 | <Stack // Could not find proper way to set spacing between ListItemIcon and ListItemText |
| 250 | direction="row" |
| 251 | spacing="16px" |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 252 | > |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 253 | <option.Icon |
| 254 | sx={{ |
| 255 | height: '16px', |
| 256 | margin: 0, |
| 257 | color: (theme) => theme.palette.primary.dark, |
| 258 | }} |
| 259 | /> |
| 260 | <ListItemText |
| 261 | primary={option.text} |
| 262 | primaryTypographyProps={{ |
| 263 | fontSize: '12px', |
| 264 | lineHeight: '16px', |
| 265 | }} |
| 266 | sx={{ |
| 267 | height: '16px', |
| 268 | margin: 0, |
| 269 | }} |
| 270 | /> |
| 271 | </Stack> |
| 272 | </ListItemButton> |
| 273 | ))} |
| 274 | </List> |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 275 | </> |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 276 | )} |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 277 | </Stack> |
| 278 | } |
| 279 | /> |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 280 | ); |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 281 | })(({ theme, position }) => { |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 282 | const largeRadius = '20px'; |
| 283 | const smallRadius = '5px'; |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 284 | return { |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 285 | backgroundColor: 'white', |
| 286 | padding: '16px', |
| 287 | boxShadow: '3px 3px 7px #00000029', |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 288 | borderRadius: largeRadius, |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 289 | borderStartStartRadius: position == 'start' ? smallRadius : largeRadius, |
| 290 | borderStartEndRadius: position == 'end' ? smallRadius : largeRadius, |
| 291 | }; |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 292 | }); |
| 293 | |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 294 | const MessageBubble = (props) => { |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 295 | const largeRadius = '20px'; |
| 296 | const smallRadius = '5px'; |
Adrien Béraud | 023f7cf | 2022-09-18 14:57:53 -0400 | [diff] [blame] | 297 | const radius = useMemo(() => { |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 298 | if (props.position == 'start') { |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 299 | return { |
| 300 | borderStartStartRadius: props.isFirstOfGroup ? largeRadius : smallRadius, |
| 301 | borderStartEndRadius: largeRadius, |
| 302 | borderEndStartRadius: props.isLastOfGroup ? largeRadius : smallRadius, |
| 303 | borderEndEndRadius: largeRadius, |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 304 | }; |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 305 | } |
| 306 | return { |
| 307 | borderStartStartRadius: largeRadius, |
| 308 | borderStartEndRadius: props.isFirstOfGroup ? largeRadius : smallRadius, |
| 309 | borderEndStartRadius: largeRadius, |
| 310 | borderEndEndRadius: props.isLastOfGroup ? largeRadius : smallRadius, |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 311 | }; |
| 312 | }, [props.isFirstOfGroup, props.isLastOfGroup, props.position]); |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 313 | |
| 314 | return ( |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 315 | <MessageTooltip position={props.position}> |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 316 | <Box |
| 317 | sx={{ |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 318 | width: 'fit-content', |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 319 | backgroundColor: props.backgroundColor, |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 320 | padding: '16px', |
idillon | 927b759 | 2022-09-15 12:56:45 -0400 | [diff] [blame] | 321 | ...radius, |
| 322 | }} |
| 323 | > |
| 324 | {props.children} |
| 325 | </Box> |
| 326 | </MessageTooltip> |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 327 | ); |
| 328 | }; |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 329 | |
| 330 | const ParticipantName = (props) => { |
| 331 | return ( |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 332 | <Box marginBottom="6px" marginLeft="16px" marginRight="16px"> |
| 333 | <Typography variant="caption" color="#A7A7A7" fontWeight={700}> |
idillon | bef18a5 | 2022-09-01 01:51:40 -0400 | [diff] [blame] | 334 | {props.name} |
| 335 | </Typography> |
| 336 | </Box> |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 337 | ); |
| 338 | }; |