diff --git a/src/components/Inputs/ButtonGroup.tsx b/src/components/Inputs/ButtonGroup.tsx index bd9566f..33a4889 100644 --- a/src/components/Inputs/ButtonGroup.tsx +++ b/src/components/Inputs/ButtonGroup.tsx @@ -1,8 +1,10 @@ +// eslint-disable-next-line import/named +import { Placement } from "tippy.js"; import { Button } from "./Button"; import { ToolTip } from "components/ToolTip"; import { cJoin } from "helpers/className"; import { ConditionalWrapper, Wrapper } from "helpers/component"; -import { isDefinedAndNotEmpty } from "helpers/asserts"; +import { isDefined } from "helpers/asserts"; /* * ╭─────────────╮ @@ -12,7 +14,8 @@ import { isDefinedAndNotEmpty } from "helpers/asserts"; interface Props { className?: string; buttonsProps: (Parameters[0] & { - tooltip?: string | null | undefined; + tooltip?: React.ReactNode | null | undefined; + tooltipPlacement?: Placement; })[]; } @@ -23,9 +26,9 @@ export const ButtonGroup = ({ buttonsProps, className }: Props): JSX.Element => {buttonsProps.map((buttonProps, index) => ( + wrapperProps={{ text: buttonProps.tooltip ?? "", placement: buttonProps.tooltipPlacement }}>