truncate the string if overlow the text (#6166)
This PR aims to fix #6102 I think we should dicuss a bit about how we should manage the lenght and set the variables globally Edit : @RobertoSimonini1 I used this PR to fix various problems that were left unsolved : - Refactor TextDisplay component, EllipsisDisplay was redundant with OverflowingTextWithTooltip - Removed maxWidth on TextDisplay for all other components, as it wasn't the right way to do it, the parent container should be responsible for width not the TextDisplay (code smell) - Drilled-down isCentered to respect its intent in the RecordInlineCell display of the record show page title - Fixed RecordInlineCellEditMode so that the portal is well centered above the record show page title - Fixed DoubleTextInput width so that it expands normally and takes all its parent available space. --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
@ -1,14 +1,9 @@
|
||||
import { OverflowingTextWithTooltip } from 'twenty-ui';
|
||||
|
||||
import { EllipsisDisplay } from './EllipsisDisplay';
|
||||
|
||||
type TextDisplayProps = {
|
||||
text: string;
|
||||
maxWidth?: number;
|
||||
};
|
||||
|
||||
export const TextDisplay = ({ text, maxWidth }: TextDisplayProps) => (
|
||||
<EllipsisDisplay maxWidth={maxWidth}>
|
||||
<OverflowingTextWithTooltip text={text} />
|
||||
</EllipsisDisplay>
|
||||
export const TextDisplay = ({ text }: TextDisplayProps) => (
|
||||
<OverflowingTextWithTooltip text={text} />
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user