Skip to content

Commit

Permalink
perf: change the enter timeout of transition
Browse files Browse the repository at this point in the history
  • Loading branch information
shervinchen committed Oct 29, 2024
1 parent 9875ff7 commit 65a419e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/Popover/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const Popover: FC<PropsWithChildren<PopoverProps>> = ({
defaultValue,
value,
});
const { stage, shouldMount } = useTransition(internalValue, 50, 50);
const { stage, shouldMount } = useTransition(internalValue, 0, 50);
const classes = classNames('raw-popover', className);

const handleClick = () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/Select/SelectDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const SelectDropdown = forwardRef<
const dropdownRef = useRef<HTMLDivElement | null>(null);
const { multiple, dropdownHeight, selectRef, getPopupContainer, selectId } =
useSelectContext();
const { stage: dropdownTransitionStage } = useTransition(visible, 50, 0);
const { stage: dropdownTransitionStage } = useTransition(visible, 0, 0);
const dropdownClasses = classNames('raw-select-dropdown', className);
const selectRect = selectRef?.current?.getBoundingClientRect() ?? null;
const dropdownWidth = selectRect
Expand Down
2 changes: 1 addition & 1 deletion packages/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Tooltip: FC<PropsWithChildren<TooltipProps>> = ({
const ref = useRef<HTMLDivElement>(null);
const theme = useTheme();
const [visible, setVisible] = useState(false);
const { stage, shouldMount } = useTransition(visible, 50, 50);
const { stage, shouldMount } = useTransition(visible, 0, 50);
const classes = classNames('raw-tooltip', className);

const handleMouseEnterOrLeave = (nextValue: boolean) => {
Expand Down

0 comments on commit 65a419e

Please sign in to comment.