Skip to content

Commit

Permalink
Rename label to tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
florianduros committed Jun 24, 2024
1 parent abf0cea commit 143771e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/Button/IconButton/IconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ type IconButtonProps = UnstyledButtonPropsFor<"button"> &
*/
destructive?: boolean;
/**
* The label for the button
* Display a tooltip when the button is hovered
*/
label?: string;
tooltip?: string;
};

/**
Expand All @@ -70,7 +70,7 @@ export const IconButton = forwardRef<
style,
disabled,
destructive,
label,
tooltip,
...props
},
ref,
Expand Down Expand Up @@ -103,5 +103,5 @@ export const IconButton = forwardRef<
</UnstyledButton>
);

return label ? <Tooltip label={label}>{button}</Tooltip> : button;
return tooltip ? <Tooltip label={tooltip}>{button}</Tooltip> : button;
});

0 comments on commit 143771e

Please sign in to comment.