Skip to content

Commit 2294fa7

Browse files
committed
fix(components,-protocol-designer): fix word break in dropdown menu
This PR fixes word break style for dropdown menu-- should break at word. Closes RQA-3950
1 parent 09e127d commit 2294fa7

File tree

2 files changed

+4
-4
lines changed
  • components/src/molecules/DropdownMenu
  • protocol-designer/src/molecules/DropdownStepFormField

2 files changed

+4
-4
lines changed

components/src/molecules/DropdownMenu/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ export function DropdownMenu(props: DropdownMenuProps): JSX.Element {
330330
>
331331
<StyledText
332332
desktopStyle="captionRegular"
333-
css={LINE_CLAMP_TEXT_STYLE(3)}
333+
css={LINE_CLAMP_TEXT_STYLE(3, true)}
334334
>
335335
{option.name}
336336
</StyledText>
@@ -369,15 +369,15 @@ export function DropdownMenu(props: DropdownMenuProps): JSX.Element {
369369

370370
export const LINE_CLAMP_TEXT_STYLE = (
371371
lineClamp?: number,
372-
title?: boolean
372+
wordBreak?: boolean
373373
): FlattenSimpleInterpolation => css`
374374
display: -webkit-box;
375375
-webkit-box-orient: vertical;
376376
overflow: ${OVERFLOW_HIDDEN};
377377
text-overflow: ellipsis;
378378
word-wrap: break-word;
379379
-webkit-line-clamp: ${lineClamp ?? 1};
380-
word-break: ${title === true
380+
word-break: ${wordBreak === true
381381
? 'normal'
382382
: 'break-all'}; // normal for tile and break-all for a non word case like aaaaaaaa
383383
`

protocol-designer/src/molecules/DropdownStepFormField/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export function DropdownStepFormField(
125125
>
126126
<StyledText
127127
desktopStyle="captionRegular"
128-
css={LINE_CLAMP_TEXT_STYLE(3)}
128+
css={LINE_CLAMP_TEXT_STYLE(3, true)}
129129
>
130130
{options[0].name}
131131
</StyledText>

0 commit comments

Comments
 (0)