react-ui icon indicating copy to clipboard operation
react-ui copied to clipboard

`Text` does not truncate long words when `lines=1`

Open adamkudrna opened this issue 4 years ago • 0 comments

This does not get truncated:

<Text lines={1}>DeviceDeviceDeviceDeviceDevice</Text>

This does get truncated:

<Text lines={1}>DeviceDeviceDeviceDevice Device</Text>

Possible solution is to set wordWrapping to long-words (any other than default).

Other solution would be a different implementation for single-line texts:

display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;

adamkudrna avatar Nov 08 '21 13:11 adamkudrna