From 2f4d847d3b4bf01d498237456e633c59c976e36c Mon Sep 17 00:00:00 2001 From: mfrachet Date: Thu, 8 Apr 2021 14:41:27 +0200 Subject: [PATCH] Ellipsis on locale cell only --- .../src/components/CustomTable/styledComponents.js | 2 -- .../src/components/LocaleListCell/LocaleListCell.js | 11 +++++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/strapi-plugin-content-manager/admin/src/components/CustomTable/styledComponents.js b/packages/strapi-plugin-content-manager/admin/src/components/CustomTable/styledComponents.js index 0d1d2ad80f..c1a4d4f4e7 100644 --- a/packages/strapi-plugin-content-manager/admin/src/components/CustomTable/styledComponents.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/CustomTable/styledComponents.js @@ -14,8 +14,6 @@ const Table = styled.table` border: none; padding: 0; white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; } th, diff --git a/packages/strapi-plugin-i18n/admin/src/components/LocaleListCell/LocaleListCell.js b/packages/strapi-plugin-i18n/admin/src/components/LocaleListCell/LocaleListCell.js index f02084eadf..2414cb90c6 100644 --- a/packages/strapi-plugin-i18n/admin/src/components/LocaleListCell/LocaleListCell.js +++ b/packages/strapi-plugin-i18n/admin/src/components/LocaleListCell/LocaleListCell.js @@ -3,6 +3,7 @@ import PropTypes from 'prop-types'; import { Padded, Text } from '@buffetjs/core'; import { Tooltip } from '@buffetjs/styles'; import get from 'lodash/get'; +import styled from 'styled-components'; const mapToLocaleName = (locales, localeCode) => get( @@ -11,6 +12,12 @@ const mapToLocaleName = (locales, localeCode) => localeCode ); +const LocaleName = styled.div` + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; +`; + const LocaleListCell = ({ locales, localizations, locale: currentLocaleCode, id }) => { const allLocalizations = [{ locale: currentLocaleCode }, ...localizations]; const localizationNames = allLocalizations.map(locale => locale.locale); @@ -47,9 +54,9 @@ const LocaleListCell = ({ locales, localizations, locale: currentLocaleCode, id return (
- + {localesNames} - + {localesArray.map(name => (