26 lines
511 B
TypeScript
26 lines
511 B
TypeScript
import type { RadioButtonProps } from "$/types/InputTypes";
|
|
import clsx from "clsx";
|
|
import { forwardRef } from "react";
|
|
import RadioButton from "./RadioButton";
|
|
|
|
|
|
const PrimaryRadioButton = forwardRef<HTMLInputElement, RadioButtonProps>(({
|
|
className,
|
|
...props
|
|
}, ref ) => {
|
|
return (
|
|
<RadioButton
|
|
className={clsx(
|
|
"group-data-checked:bg-primary",
|
|
className
|
|
)}
|
|
ref={ref}
|
|
{...props}
|
|
/>
|
|
);
|
|
});
|
|
|
|
PrimaryRadioButton.displayName = "PrimaryRadioButton";
|
|
|
|
export default PrimaryRadioButton;
|