From 6c880628ec6b3a32452b3d64c858e27f2e1c7b65 Mon Sep 17 00:00:00 2001 From: Zephyruso <127948745+Zephyruso@users.noreply.github.com> Date: Wed, 6 Sep 2023 22:20:45 +0800 Subject: [PATCH] fix: btn disable && var name --- src/components/Button.tsx | 13 ++++++++++--- src/pages/Connections.tsx | 16 ++++++++-------- src/pages/Proxies.tsx | 6 +++++- src/pages/Rules.tsx | 2 ++ 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/src/components/Button.tsx b/src/components/Button.tsx index a0b02dd..c542807 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -2,13 +2,20 @@ import { JSX, ParentComponent, Show, splitProps } from 'solid-js' import { twMerge } from 'tailwind-merge' export const Button: ParentComponent< - JSX.ButtonHTMLAttributes & { loading?: boolean } + JSX.ButtonHTMLAttributes & { + loading?: boolean + disabled?: boolean + } > = (props) => { - const [local, others] = splitProps(props, ['class', 'loading']) + const [local, others] = splitProps(props, ['class', 'loading', 'disabled']) return (