From f51f45d0dcda7c78b61cef66d34cbe24e4a5e206 Mon Sep 17 00:00:00 2001 From: Jan-Gerke Salomon Date: Mon, 11 Dec 2023 14:24:21 +0100 Subject: [PATCH 1/2] fix(alertbar action): prevent text wrapping --- components/alert/src/alert-bar/action.js | 1 + 1 file changed, 1 insertion(+) diff --git a/components/alert/src/alert-bar/action.js b/components/alert/src/alert-bar/action.js index f4aecb118b..273ecdc6eb 100644 --- a/components/alert/src/alert-bar/action.js +++ b/components/alert/src/alert-bar/action.js @@ -16,6 +16,7 @@ class Action extends Component { span { margin-right: ${spacers.dp12}; text-decoration: underline; + white-space: nowrap; } span:hover { cursor: pointer; From 566f3108c4f16fe16b3472d29a00d76a1a482966 Mon Sep 17 00:00:00 2001 From: Jan-Gerke Salomon Date: Mon, 11 Dec 2023 14:25:49 +0100 Subject: [PATCH 2/2] chore(alert bar): add story with long texts / insufficient space for one line --- .../alert/src/alert-bar/alert-bar.stories.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/components/alert/src/alert-bar/alert-bar.stories.js b/components/alert/src/alert-bar/alert-bar.stories.js index 9b8beb31db..972c276645 100644 --- a/components/alert/src/alert-bar/alert-bar.stories.js +++ b/components/alert/src/alert-bar/alert-bar.stories.js @@ -147,6 +147,21 @@ export const WithActions = () => ( ) WithActions.storyName = 'With actions' +export const WithActionsAndInsufficientSpace = () => ( + {} }, + { label: 'Long action 2', onClick: () => {} }, + ]} + > + Some text, a pretty normal amount, that conflicts with pretty long + actions + +) +WithActionsAndInsufficientSpace.storyName = + 'With actions and insufficient space' + export const Icons = () => ( Default icon