We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 361b662 commit c8f44f2Copy full SHA for c8f44f2
src/components/fields/RadioGroup.tsx
@@ -1,11 +1,13 @@
1
import type { ChangeEvent, FC, ReactNode } from 'react';
2
import type { RadioGroupItem } from '../../types';
3
import { cn } from '../../utils/cn';
4
+import { Tooltip } from './Tooltip';
5
6
export interface IRadioGroup {
7
name: string;
8
label: string;
9
helpText?: ReactNode | string;
10
+ tooltip?: ReactNode | string;
11
options: RadioGroupItem[];
12
value: string;
13
disabled?: boolean;
@@ -26,6 +28,9 @@ export const RadioGroup: FC<IRadioGroup> = (props: IRadioGroup) => {
26
28
}
27
29
>
30
{props.label}
31
+ {props.tooltip && (
32
+ <Tooltip name={`tooltip-${props.name}`} tooltip={props.tooltip} />
33
+ )}
34
</label>
35
</div>
36
0 commit comments