chore: fixed error with typings

This commit is contained in:
Ebezer Igbinoba
2023-08-23 16:36:48 +01:00
parent 9a1b453c86
commit ac66834daa
12 changed files with 297 additions and 437 deletions
@@ -8,11 +8,12 @@ export type CheckboxProps = Omit<
CheckboxPrimitive.CheckboxProps,
"checked" | "disabled" | "required"
> & {
children: ReactNode;
children?: ReactNode;
id: string;
isDisabled?: boolean;
isChecked?: boolean;
isRequired?: boolean;
checkIndicatorBg?: string | undefined;
};
export const Checkbox = ({
@@ -22,6 +23,7 @@ export const Checkbox = ({
isChecked,
isDisabled,
isRequired,
checkIndicatorBg,
...props
}: CheckboxProps): JSX.Element => {
return (
@@ -39,7 +41,7 @@ export const Checkbox = ({
{...props}
id={id}
>
<CheckboxPrimitive.Indicator className="text-bunker-800">
<CheckboxPrimitive.Indicator className={`${checkIndicatorBg || "text-bunker-800"}`}>
<FontAwesomeIcon icon={faCheck} size="sm" />
</CheckboxPrimitive.Indicator>
</CheckboxPrimitive.Root>
+1 -13
View File
@@ -1,17 +1,10 @@
import { ReactNode } from "react";
import { faClose } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { cva, VariantProps } from "cva";
import { twMerge } from "tailwind-merge";
type Props = {
children: ReactNode;
className?: string;
onClose?: () => void;
color?: string;
styles?: Record<string, string>
isDisabled?: boolean;
tagColor: string;
} & VariantProps<typeof tagVariants>;
const tagVariants = cva(
@@ -34,12 +27,7 @@ export const Tag = ({
children,
className,
colorSchema = "gray",
color,
isDisabled,
size = "sm",
onClose,
styles = {}
}: Props) => (
size = "sm" }: Props) => (
<div
className={twMerge(tagVariants({ colorSchema, className, size }))}
>