From 7049e704ec93b8255274e4479e3397bfcbed5651 Mon Sep 17 00:00:00 2001 From: Viorel Cojocaru Date: Sun, 23 Jun 2024 19:09:14 +0200 Subject: [PATCH] fix(ui): FileName - limit height to 2 rows --- packages/ui/src/ui/file-name/file-name.module.css | 2 ++ packages/ui/src/ui/file-name/file-name.stories.jsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/ui/file-name/file-name.module.css b/packages/ui/src/ui/file-name/file-name.module.css index 24fe2af81b..9c23478cf7 100644 --- a/packages/ui/src/ui/file-name/file-name.module.css +++ b/packages/ui/src/ui/file-name/file-name.module.css @@ -6,4 +6,6 @@ word-break: break-word; hyphens: auto; white-space: normal; + max-height: calc(2em * var(--line-height)); + overflow: hidden; } diff --git a/packages/ui/src/ui/file-name/file-name.stories.jsx b/packages/ui/src/ui/file-name/file-name.stories.jsx index a950689b05..43c6a9f938 100644 --- a/packages/ui/src/ui/file-name/file-name.stories.jsx +++ b/packages/ui/src/ui/file-name/file-name.stories.jsx @@ -13,7 +13,7 @@ const NAMES = [ 'styles.css', './src/components/sources/styles.css', 'css ./node_modules/css-loader/dist/cjs.js??ref--6-1!./node_modules/postcss-loader/src!./src/components/sources/source/styles.css', - 'rreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordeallylongword', + 'rreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordeallylongwordrreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordeallylongwordrreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordreallylongwordeallylongword', ]; export const Default = () => (