forked from pavlitoPogosov/React-Table-Component
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTableCellWithId.tsx
More file actions
25 lines (22 loc) · 747 Bytes
/
Copy pathTableCellWithId.tsx
File metadata and controls
25 lines (22 loc) · 747 Bytes
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
import React from 'react';
import {I18n} from 'shared/i18n';
import {truncateString} from 'shared/string';
import {ButtonCopy} from '../ButtonCopy';
import {Flex} from '../Flex';
import {Spacer} from '../Spacer';
import {Typography} from '../Typography';
export const TableCellWithId = ({id, title}: {id: string; title: string}) => (
<Flex flexDirection="column">
<Typography color="gray.90" fontWeight="medium">
{title}
</Typography>
<Spacer size={2} />
<Flex alignItems="center">
<Typography color="gray.50">{truncateString(id, 3)}</Typography>
<Spacer direction="horizontal" size={4} />
<ButtonCopy text={id}>
<I18n i18nKey="common.layout.id" />
</ButtonCopy>
</Flex>
</Flex>
);