From 1e6504771ace420050f31e596828d37d3f80716c Mon Sep 17 00:00:00 2001 From: morteza-mortezai Date: Thu, 9 Jul 2026 17:35:24 +0330 Subject: [PATCH] cat --- src/components/Button.tsx | 23 ++++--- src/components/Select.tsx | 32 ++++++---- .../request/components/ProductsSelect.tsx | 61 +++++++++++-------- src/pages/request/service/RequestService.ts | 4 +- 4 files changed, 76 insertions(+), 44 deletions(-) diff --git a/src/components/Button.tsx b/src/components/Button.tsx index f105e87..f1207f8 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -12,27 +12,36 @@ type Props = { XOR<{ children: ReactNode }, { label: string }>; const Button: FC = memo((props: Props) => { + const { + className, + disabled, + isLoading, + percentage, + label, + children, + ...buttonProps + } = props const buttonClass = clx( 'flex rounded-xl items-center justify-center text-center h-10 text-sm bg-primary w-full', - props.disabled && 'cursor-not-allowed opacity-60', - props.className + disabled && 'cursor-not-allowed opacity-60', + className ); return ( - ) diff --git a/src/components/Select.tsx b/src/components/Select.tsx index 28b422a..84a95b0 100644 --- a/src/components/Select.tsx +++ b/src/components/Select.tsx @@ -17,27 +17,37 @@ type Props = { } & SelectHTMLAttributes const Select: FC = (props: Props) => { + const { + className, + items, + error_text, + placeholder, + label, + readOnly, + ...selectProps + } = props + return (
{ - props.label && + label && }
-