Skip to content

Commit 3589ed4

Browse files
author
Kubit
committed
Add props to Text component to break words
1 parent 987dc1c commit 3589ed4

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/components/text/textStandAlone.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,7 @@ import { ITextStandAlone } from './types/text';
77
import { TextTransformType } from './types/transform';
88

99
const TextStandAloneComponent = (
10-
{
11-
dataTestId = 'text',
12-
13-
transform = TextTransformType.NONE,
14-
...props
15-
}: ITextStandAlone,
10+
{ dataTestId = 'text', transform = TextTransformType.NONE, ...props }: ITextStandAlone,
1611
ref: React.ForwardedRef<HTMLParagraphElement> | null
1712
): JSX.Element => {
1813
const ariaProps = pickAriaProps(props);

src/components/text/types/text.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export interface ITextStyled {
2323

2424
type TextAriaAttributes = Pick<
2525
React.AriaAttributes,
26-
'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-hidden' | 'aria-level'
26+
'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-hidden' | 'aria-level' | 'aria-live'
2727
>;
2828

2929
export interface ITextStandAlone extends ITextStyled, TextAriaAttributes {
@@ -35,6 +35,8 @@ export interface ITextStandAlone extends ITextStyled, TextAriaAttributes {
3535
onClick?: React.MouseEventHandler<HTMLElement>;
3636
role?: React.AriaRole;
3737
color?: string;
38+
wordBreak?: string;
39+
wordWrap?: string;
3840
filter?: string;
3941
display?: TextDisplayType;
4042
decoration?: TextDecorationType;

src/components/text/types/textTheme.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ export type TextPropsStylesType = {
4141
$transform?: TextTransformType;
4242
align?: string;
4343
weight?: number;
44+
wordBreak?: string;
45+
wordWrap?: string;
4446
isDisabled?: boolean;
4547
$maxTruncatedLines?: number;
4648
$truncate?: boolean;

0 commit comments

Comments
 (0)