Skip to content

Commit

Permalink
feat(Text): added break-word to wordBreak property (#1424)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruminat authored Mar 18, 2024
1 parent 682444a commit 607c3ea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/Text/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ LANDING_BLOCK-->

### Word Break

The word-break css property. Can be `break-all`.
The word-break css property. Can be `break-all` | `break-word`.

<!--LANDING_BLOCK
Expand Down Expand Up @@ -174,6 +174,6 @@ LANDING_BLOCK-->
| ellipsis | Hidden overflow content will be replaced by an ellipsis | `boolean` | |
| ellipsisLines | The number of whole lines of text after which the content will be cut off | `number` | |
| whiteSpace | The white-space css property | `"nowrap"` `"break-spaces"` | |
| wordBreak | The word-break css property | `"break-all"` | |
| wordBreak | The word-break css property | `"break-all"` `"break-word"` | |
| color | Color of the text | `string` (see values in "Color" section) | |
| qa | HTML `data-qa` attribute, used in tests | `string` | |
3 changes: 3 additions & 0 deletions src/components/Text/text/text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,7 @@ $block: '.#{variables.$ns}text';
&_wb_break-all {
word-break: break-all;
}
&_wb_break-word {
word-break: break-word;
}
}
2 changes: 1 addition & 1 deletion src/components/Text/text/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export interface TextBaseProps {
/**
* word-break css property
*/
wordBreak?: 'break-all';
wordBreak?: 'break-all' | 'break-word';
}

/**
Expand Down

0 comments on commit 607c3ea

Please sign in to comment.