From 3310617db15d81a2c60939cf7912e573278f55b8 Mon Sep 17 00:00:00 2001 From: "Yuanqi(Ella) Zhu" <53279298+zhyuanqi@users.noreply.github.com> Date: Tue, 16 Apr 2024 14:38:25 -0700 Subject: [PATCH] Modify the button of selectable component to fix the title overflow issue (#6465) * Modify the button of selectable component to fix the title overflow issue Signed-off-by: Yuanqi(Ella) Zhu * update snapshot Signed-off-by: Yuanqi(Ella) Zhu --------- Signed-off-by: Yuanqi(Ella) Zhu (cherry picked from commit b619ccb5fea8b23a748d74ba3dec21aabb1a7765) --- .../public/components/button_title.scss | 7 +++++++ .../create_data_source_menu.test.tsx.snap | 6 +++--- .../__snapshots__/data_source_selectable.test.tsx.snap | 10 +++++----- .../data_source_selectable/data_source_selectable.tsx | 5 +++-- 4 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 src/plugins/data_source_management/public/components/button_title.scss diff --git a/src/plugins/data_source_management/public/components/button_title.scss b/src/plugins/data_source_management/public/components/button_title.scss new file mode 100644 index 000000000000..66b32d4ee8b7 --- /dev/null +++ b/src/plugins/data_source_management/public/components/button_title.scss @@ -0,0 +1,7 @@ +.dataSourceComponentButtonTitle { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + width: auto; + max-width: 16ch; +} diff --git a/src/plugins/data_source_management/public/components/data_source_menu/__snapshots__/create_data_source_menu.test.tsx.snap b/src/plugins/data_source_management/public/components/data_source_menu/__snapshots__/create_data_source_menu.test.tsx.snap index c520768a6890..c705db9194b0 100644 --- a/src/plugins/data_source_management/public/components/data_source_menu/__snapshots__/create_data_source_menu.test.tsx.snap +++ b/src/plugins/data_source_management/public/components/data_source_menu/__snapshots__/create_data_source_menu.test.tsx.snap @@ -104,7 +104,7 @@ Object { >