mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-02 11:12:20 +08:00
fix(ReadPretty): apply conditional flex styling based on ellipsis prop (#7094)
This commit is contained in:
parent
544f561b26
commit
94e40c5c7b
@ -56,12 +56,13 @@ ReadPretty.Input = (props: InputReadPrettyProps) => {
|
|||||||
return props.value && typeof props.value === 'object' ? JSON.stringify(props.value) : compile(props.value);
|
return props.value && typeof props.value === 'object' ? JSON.stringify(props.value) : compile(props.value);
|
||||||
}, [props.value]);
|
}, [props.value]);
|
||||||
|
|
||||||
|
const flexStyle = props.ellipsis ? { display: 'flex', alignItems: 'center' } : {};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={cls(prefixCls, props.className)}
|
className={cls(prefixCls, props.className)}
|
||||||
style={{
|
style={{
|
||||||
display: 'flex',
|
...flexStyle,
|
||||||
alignItems: 'center',
|
|
||||||
overflowWrap: 'break-word',
|
overflowWrap: 'break-word',
|
||||||
whiteSpace: 'normal',
|
whiteSpace: 'normal',
|
||||||
...props.style,
|
...props.style,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user