Merge pull request #11030 from strapi/cm-table-fix

MigrationQA/ Ellipsis in CM LV table
This commit is contained in:
cyril lopez 2021-09-22 10:44:21 +02:00 committed by GitHub
commit 07e4b65868
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,11 +1,16 @@
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { Text } from '@strapi/parts/Text';
import Media from './Media';
import MultipleMedias from './MultipleMedias';
import Relation from './Relation';
import CellValue from './CellValue';
const TextMaxWidth = styled(Text)`
max-width: 300px;
`;
const CellContent = ({ content, fieldSchema, metadatas, name, queryInfos, rowId }) => {
if (content === null || content === undefined) {
return <Text textColor="neutral800">-</Text>;
@ -33,9 +38,9 @@ const CellContent = ({ content, fieldSchema, metadatas, name, queryInfos, rowId
}
return (
<Text textColor="neutral800">
<TextMaxWidth ellipsis textColor="neutral800">
<CellValue type={fieldSchema.type} value={content} />
</Text>
</TextMaxWidth>
);
};