fix(ReadPretty): apply conditional flex styling based on ellipsis prop (#7094)

This commit is contained in:
Zeke Zhang 2025-06-18 20:34:07 +08:00 committed by GitHub
parent 544f561b26
commit 94e40c5c7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -56,12 +56,13 @@ ReadPretty.Input = (props: InputReadPrettyProps) => {
return props.value && typeof props.value === 'object' ? JSON.stringify(props.value) : compile(props.value);
}, [props.value]);
const flexStyle = props.ellipsis ? { display: 'flex', alignItems: 'center' } : {};
return (
<div
className={cls(prefixCls, props.className)}
style={{
display: 'flex',
alignItems: 'center',
...flexStyle,
overflowWrap: 'break-word',
whiteSpace: 'normal',
...props.style,