feat: add links to Links field (#5223)
Closes #5115, Closes #5116 <img width="242" alt="image" src="https://github.com/twentyhq/twenty/assets/3098428/ab78495a-4216-4243-8de3-53720818a09b"> --------- Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { MouseEvent } from 'react';
|
||||
import { MouseEvent, ReactNode } from 'react';
|
||||
import { IconComponent } from 'twenty-ui';
|
||||
|
||||
import { LightIconButtonGroup } from '@/ui/input/button/components/LightIconButtonGroup';
|
||||
@ -18,7 +18,7 @@ export type MenuItemIconButton = {
|
||||
export type MenuItemProps = {
|
||||
LeftIcon?: IconComponent | null;
|
||||
accent?: MenuItemAccent;
|
||||
text: string;
|
||||
text: ReactNode;
|
||||
iconButtons?: MenuItemIconButton[];
|
||||
isIconDisplayedOnHoverOnly?: boolean;
|
||||
isTooltipOpen?: boolean;
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import { ReactNode } from 'react';
|
||||
import { useTheme } from '@emotion/react';
|
||||
import { isString } from '@sniptt/guards';
|
||||
import {
|
||||
IconComponent,
|
||||
IconGripVertical,
|
||||
@ -14,7 +16,7 @@ type MenuItemLeftContentProps = {
|
||||
className?: string;
|
||||
LeftIcon: IconComponent | null | undefined;
|
||||
showGrip?: boolean;
|
||||
text: string;
|
||||
text: ReactNode;
|
||||
};
|
||||
|
||||
export const MenuItemLeftContent = ({
|
||||
@ -38,7 +40,7 @@ export const MenuItemLeftContent = ({
|
||||
<LeftIcon size={theme.icon.size.md} stroke={theme.icon.stroke.sm} />
|
||||
)}
|
||||
<StyledMenuItemLabel hasLeftIcon={!!LeftIcon}>
|
||||
<OverflowingTextWithTooltip text={text} />
|
||||
{isString(text) ? <OverflowingTextWithTooltip text={text} /> : text}
|
||||
</StyledMenuItemLabel>
|
||||
</StyledMenuItemLeftContent>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user