diff --git a/src/components/Checkbox/Checkbox.tsx b/src/components/Checkbox/Checkbox.tsx index a5ff6c7..0be1fa8 100644 --- a/src/components/Checkbox/Checkbox.tsx +++ b/src/components/Checkbox/Checkbox.tsx @@ -82,9 +82,11 @@ export function Checkbox({ )} {...fieldsetProps} > - - {legendProps?.children ?? label} - + {(legendProps || label) && ( + + {legendProps?.children ?? label} + + )} {hint && ( {hint} @@ -123,7 +125,7 @@ export function Checkbox({ - {option.tooltip && } + {option.tooltip && } {option.hint && ( {option.hint} diff --git a/src/components/InputField/InputField.tsx b/src/components/InputField/InputField.tsx index 1fd04ba..b54258b 100644 --- a/src/components/InputField/InputField.tsx +++ b/src/components/InputField/InputField.tsx @@ -182,7 +182,7 @@ export function InputField({ - {tooltip && } + {tooltip && } {hint && ( {hint} diff --git a/src/components/RadioButtons/RadioButtons.tsx b/src/components/RadioButtons/RadioButtons.tsx index 53ac4c5..536ae25 100644 --- a/src/components/RadioButtons/RadioButtons.tsx +++ b/src/components/RadioButtons/RadioButtons.tsx @@ -96,7 +96,7 @@ export function RadioButtons({ > {legendProps?.children ?? label} - {tooltip && } + {tooltip && } {hint && ( diff --git a/src/components/Tooltip/Tooltip.tsx b/src/components/Tooltip/Tooltip.tsx index 06eab49..726d6bc 100644 --- a/src/components/Tooltip/Tooltip.tsx +++ b/src/components/Tooltip/Tooltip.tsx @@ -27,6 +27,7 @@ export type TooltipProps = { position: "above" | "below"; trigger: "click" | "hover"; forceVisible?: boolean; + noMargin?: boolean; children?: React.ReactNode; tooltipId?: string; }; @@ -38,6 +39,7 @@ export const Tooltip = forwardRef(function Tooltip( tooltipId, position, icon = "help", + noMargin = false, tooltipIsLabel = false, inText = false, forceVisible = false, @@ -79,7 +81,11 @@ export const Tooltip = forwardRef(function Tooltip( return (