Skip to content

Commit

Permalink
Change default open delay of action tooltips to 2 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
LASER-Yi committed Jun 5, 2022
1 parent 4481cda commit 51d1c46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/App/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const AppHeader: FunctionComponent = () => {
control={
<Action
label="System"
tooltip={{ position: "left" }}
tooltip={{ position: "left", openDelay: 2000 }}
loading={offline}
color={offline ? "yellow" : undefined}
icon={faGear}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/inputs/Action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ import { forwardRef } from "react";
export type ActionProps = ActionIconProps<"button"> & {
icon: IconDefinition;
label: string;
tooltip?: Omit<TooltipProps, "label" | "openDelay" | "children">;
tooltip?: Omit<TooltipProps, "label" | "children">;
iconProps?: Omit<FontAwesomeIconProps, "icon">;
};

const Action = forwardRef<HTMLButtonElement, ActionProps>(
({ icon, iconProps, label, tooltip, ...props }, ref) => {
return (
<Tooltip {...tooltip} label={label} openDelay={500}>
<Tooltip openDelay={1500} {...tooltip} label={label}>
<ActionIcon aria-label={label} {...props} ref={ref}>
<FontAwesomeIcon icon={icon} {...iconProps}></FontAwesomeIcon>
</ActionIcon>
Expand Down

0 comments on commit 51d1c46

Please sign in to comment.