mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 07:35:09 +00:00
chore: fixed error with typings
This commit is contained in:
@@ -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,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 }))}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user