Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
[terra-button] Left alignment for button text that wraps.
Browse files Browse the repository at this point in the history
  • Loading branch information
cm9361 committed Apr 3, 2024
1 parent 6c96489 commit 0d4b47e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/terra-button/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Changed
* Updated styles to ensure span content is left aligned when wrapping.

## 3.76.0 - (March 20, 2024)

* Added
Expand Down
1 change: 1 addition & 0 deletions packages/terra-button/src/Button.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@

&.is-left-aligned {
justify-content: start;
text-align: start;
}
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ const words = 'Art artisan blog future next level odd park party polaroid truffa

const LongTextButton = () => <Button id="long-text" text={text} />;
const LongTextBlockButton = () => <Button id="long-text-block" text={text} isBlock />;
const LongTextLeftBlockButton = () => <Button id="long-text-left-block" text={`Left Aligned: ${words}`} isBlock isLeftAligned />;

export default () => (
<div>
<LongTextButton />
<div className={cx('spacing')} />
<LongTextBlockButton />
<div className={cx('spacing')} />
<LongTextLeftBlockButton />
<div className={cx('spacing')} />
<Button id="long-word" text={words} />
<div className={cx('spacing')} />
<Button id="long-word-block" text={words} isBlock />
Expand Down

0 comments on commit 0d4b47e

Please sign in to comment.