@vertisanpro/flowbite-react
Version:
Non-Official React components built for Flowbite and Tailwind CSS
10 lines (9 loc) • 573 B
JavaScript
import { twMerge } from '@vertisanpro/tailwind-merge';
import React, { forwardRef } from 'react';
import { mergeDeep } from '../../helpers/merge-deep';
import { getTheme } from '../../theme-store';
export const Checkbox = forwardRef(({ className, color = 'default', theme: customTheme = {}, ...props }, ref) => {
const theme = mergeDeep(getTheme().checkbox, customTheme);
return (React.createElement("input", { ref: ref, type: "checkbox", className: twMerge(theme.root.base, theme.root.color[color], className), ...props }));
});
Checkbox.displayName = 'Checkbox';