{
/**
* The wrapper props of the radio item.
* You can use this prop to customize the wrapper props.
@@ -27,6 +30,10 @@ export interface RadioItemProps extends RadioGroupItemProps {
* The id of the radio item.
*/
id?: string;
+ /**
+ * The left icon of the radio item.
+ */
+ leftIcon?: ReactNode;
/**
* The label of the radio item.
*/
@@ -41,18 +48,26 @@ export const RadioItem = ({
wrapperProps,
labelProps,
indicatorProps,
+ leftIcon,
label,
id,
+ variant,
...props
}: RadioItemProps) => {
- const { wrapper, label: labelClass, radio, indicator } = radioTheme();
+ const {
+ wrapper,
+ label: labelClass,
+ radio,
+ indicator,
+ icon,
+ } = radioTheme({ variant });
// Generate a unique id for the radio item from the label if the id is not provided
const kebabCaseLabel = label?.toLowerCase().replace(/\s+/g, '-');
const componentId = id ?? kebabCaseLabel;
return (
-
+
+
);
};