Skip to content

Commit

Permalink
fix(deprecated): warnings on deprecated code of antd
Browse files Browse the repository at this point in the history
  • Loading branch information
eythaann committed Jan 8, 2025
1 parent f2f8a36 commit 715225a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/apps/shared/components/OverflowTooltip/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import cs from './index.module.css';

interface Props {
text: string;
overlayClassName?: string;
rootClassName?: string;
className?: string;
placement?: TooltipProps['placement'];
arrow?: TooltipProps['arrow'];
}

function _OverflowTooltip({ text, className, ...rest }: Props) {
function _OverflowTooltip({ text, className, rootClassName, ...rest }: Props) {
const textRef = useRef<HTMLSpanElement>(null);
const [isOverflow, setIsOverflow] = useState(false);

Expand All @@ -27,7 +27,7 @@ function _OverflowTooltip({ text, className, ...rest }: Props) {
) : null;

return (
<Tooltip title={tooltip} {...rest}>
<Tooltip title={tooltip} classNames={{ root: rootClassName }} {...rest}>
<span ref={textRef} className={cx(cs.text, className)}>
{text}
</span>
Expand Down
2 changes: 1 addition & 1 deletion src/apps/toolbar/modules/Tray/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function TrayItem(props: { tray: TrayInfo; onAction: anyFunction; idx: number })
<img src={convertFileSrc(tray.icon ? tray.icon : LAZY_CONSTANTS.MISSING_ICON_PATH)} />
</div>
<OverflowTooltip
overlayClassName="tray-item-label-tooltip"
rootClassName="tray-item-label-tooltip"
className="tray-item-label"
text={tray.label || t('unlabelled_tray')}
placement="left"
Expand Down
2 changes: 1 addition & 1 deletion src/apps/toolbar/modules/Workspaces/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function WorkspacesModule({ module }: Props) {
<Tooltip
arrow={false}
mouseLeaveDelay={0}
overlayClassName="ft-bar-item-tooltip"
classNames={{ root: 'ft-bar-item-tooltip' }}
title={w.name || `Workspace ${idx + 1}`}
key={w.id}
>
Expand Down
2 changes: 1 addition & 1 deletion src/apps/toolbar/modules/item/infra/Inner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export function InnerItem(props: InnerItemProps) {
<Tooltip
arrow={false}
mouseLeaveDelay={0}
overlayClassName="ft-bar-item-tooltip"
classNames={{ root: 'ft-bar-item-tooltip' }}
title={tooltip ? parseStringToElements(tooltip) : undefined}
>
<Reorder.Item
Expand Down

0 comments on commit 715225a

Please sign in to comment.