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