Skip to content

Commit

Permalink
Merge pull request #1439 from dhis2/LIBS-253
Browse files Browse the repository at this point in the history
fix(alertbar): address long texts
  • Loading branch information
Mohammer5 authored Dec 11, 2023
2 parents b861993 + 566f310 commit 684e041
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions components/alert/src/alert-bar/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Action extends Component {
span {
margin-right: ${spacers.dp12};
text-decoration: underline;
white-space: nowrap;
}
span:hover {
cursor: pointer;
Expand Down
15 changes: 15 additions & 0 deletions components/alert/src/alert-bar/alert-bar.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,21 @@ export const WithActions = () => (
)
WithActions.storyName = 'With actions'

export const WithActionsAndInsufficientSpace = () => (
<AlertBar
permanent
actions={[
{ label: 'Long action 1', onClick: () => {} },
{ label: 'Long action 2', onClick: () => {} },
]}
>
Some text, a pretty normal amount, that conflicts with pretty long
actions
</AlertBar>
)
WithActionsAndInsufficientSpace.storyName =
'With actions and insufficient space'

export const Icons = () => (
<React.Fragment>
<AlertBar permanent>Default icon</AlertBar>
Expand Down

0 comments on commit 684e041

Please sign in to comment.