bigbuffet-rw/app/soapbox/components/ui/checkbox/checkbox.tsx

18 lines
536 B
TypeScript
Raw Normal View History

2022-05-09 06:52:41 -07:00
import React from 'react';
interface ICheckbox extends Pick<React.InputHTMLAttributes<HTMLInputElement>, 'disabled' | 'id' | 'name' | 'onChange' | 'checked' | 'required'> { }
2022-05-09 10:20:50 -07:00
/** A pretty checkbox input. */
2022-05-09 06:52:41 -07:00
const Checkbox = React.forwardRef<HTMLInputElement, ICheckbox>((props, ref) => {
return (
<input
{...props}
ref={ref}
type='checkbox'
2022-05-10 12:52:12 -07:00
className='dark:bg-slate-800 dark:border-gray-600 focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded'
2022-05-09 06:52:41 -07:00
/>
);
});
export default Checkbox;