mirror of
https://github.com/strapi/strapi.git
synced 2025-09-22 14:59:07 +00:00
DynamicTable: avoid wrapping single components in flex components
This commit is contained in:
parent
f58b78c39e
commit
37468e0824
@ -1,9 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Flex } from '@strapi/design-system/Flex';
|
|
||||||
import { Tooltip } from '@strapi/design-system/Tooltip';
|
import { Tooltip } from '@strapi/design-system/Tooltip';
|
||||||
import { Typography } from '@strapi/design-system/Typography';
|
import { Typography } from '@strapi/design-system/Typography';
|
||||||
import { stopPropagation } from '@strapi/helper-plugin';
|
|
||||||
|
|
||||||
import CellValue from '../CellValue';
|
import CellValue from '../CellValue';
|
||||||
|
|
||||||
@ -12,13 +10,11 @@ const SingleComponentCell = ({ value, metadatas }) => {
|
|||||||
const content = value[mainField.name];
|
const content = value[mainField.name];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex {...stopPropagation}>
|
<Tooltip label={content}>
|
||||||
<Tooltip label={content}>
|
<Typography textColor="neutral800" ellipsis>
|
||||||
<Typography textColor="neutral800" ellipsis>
|
<CellValue type={mainField.type} value={content} />
|
||||||
<CellValue type={mainField.type} value={content} />
|
</Typography>
|
||||||
</Typography>
|
</Tooltip>
|
||||||
</Tooltip>
|
|
||||||
</Flex>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user