diff options
author | crupest <crupest@outlook.com> | 2023-07-29 22:00:59 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2023-07-29 22:00:59 +0800 |
commit | 22e8f24e7f7574915e4c75d3c6a5498f6e621ee8 (patch) | |
tree | a164dbcb6bf2e87e275cc736b65a22f34f788b14 /FrontEnd/src/views/common/button | |
parent | 13f6f2a451feede8037d18cfbac64843e108ccbd (diff) | |
download | timeline-22e8f24e7f7574915e4c75d3c6a5498f6e621ee8.tar.gz timeline-22e8f24e7f7574915e4c75d3c6a5498f6e621ee8.tar.bz2 timeline-22e8f24e7f7574915e4c75d3c6a5498f6e621ee8.zip |
...
Diffstat (limited to 'FrontEnd/src/views/common/button')
-rw-r--r-- | FrontEnd/src/views/common/button/LoadingButton.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/FrontEnd/src/views/common/button/LoadingButton.tsx b/FrontEnd/src/views/common/button/LoadingButton.tsx index f23369de..bfa5b6b8 100644 --- a/FrontEnd/src/views/common/button/LoadingButton.tsx +++ b/FrontEnd/src/views/common/button/LoadingButton.tsx @@ -15,7 +15,8 @@ interface LoadingButtonProps extends React.ComponentPropsWithoutRef<"button"> { export default function LoadingButton(props: LoadingButtonProps) { const c = useC(); - const { color, text, loading, className, children, ...otherProps } = props; + const { color, text, loading, disabled, className, children, ...otherProps } = + props; if (text != null && children != null) { console.warn("You can't set both text and children props."); @@ -23,7 +24,7 @@ export default function LoadingButton(props: LoadingButtonProps) { return ( <button - disabled={loading} + disabled={disabled || loading} className={classNames( `cru-${color ?? "primary"} cru-button outline cru-loading-button`, className, |