From fbb5ede27242bdde7ce24298cda381e342a4a1c3 Mon Sep 17 00:00:00 2001 From: Pablo Lara Date: Fri, 27 Sep 2024 10:45:12 +0200 Subject: [PATCH] chore: add types in the proper directory --- components/ui/custom/CustomButton.tsx | 17 +---------------- types/components.ts | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/components/ui/custom/CustomButton.tsx b/components/ui/custom/CustomButton.tsx index 80671af547..9aa3b4a888 100644 --- a/components/ui/custom/CustomButton.tsx +++ b/components/ui/custom/CustomButton.tsx @@ -2,22 +2,7 @@ import { Button, CircularProgress } from "@nextui-org/react"; import type { PressEvent } from "@react-types/shared"; import clsx from "clsx"; -type NextUIVariants = - | "solid" - | "faded" - | "bordered" - | "light" - | "flat" - | "ghost" - | "shadow"; - -type NextUIColors = - | "primary" - | "secondary" - | "success" - | "warning" - | "danger" - | "default"; +import { NextUIColors, NextUIVariants } from "@/types"; export const buttonClasses = { base: "px-2 inline-flex items-center justify-center relative z-0 text-center whitespace-nowrap", diff --git a/types/components.ts b/types/components.ts index 237d08d7e9..3727d94f86 100644 --- a/types/components.ts +++ b/types/components.ts @@ -9,6 +9,23 @@ export type IconProps = { style?: React.CSSProperties; }; +export type NextUIVariants = + | "solid" + | "faded" + | "bordered" + | "light" + | "flat" + | "ghost" + | "shadow"; + +export type NextUIColors = + | "primary" + | "secondary" + | "success" + | "warning" + | "danger" + | "default"; + export interface SearchParamsProps { [key: string]: string | string[] | undefined; }