aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/views/common/button
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2023-07-11 01:01:48 +0800
committercrupest <crupest@outlook.com>2023-07-11 01:01:48 +0800
commitd46b1aed549938c9f5e3e658b4098e71b5e2acf7 (patch)
tree0deae7f40692345c8e4b1473cdddbd13e0e5586d /FrontEnd/src/views/common/button
parentd9b83e4e8215168dda03b04168d7e30ce5fe779f (diff)
downloadtimeline-d46b1aed549938c9f5e3e658b4098e71b5e2acf7.tar.gz
timeline-d46b1aed549938c9f5e3e658b4098e71b5e2acf7.tar.bz2
timeline-d46b1aed549938c9f5e3e658b4098e71b5e2acf7.zip
Lint error, get away!
Diffstat (limited to 'FrontEnd/src/views/common/button')
-rw-r--r--FrontEnd/src/views/common/button/IconButton.tsx6
-rw-r--r--FrontEnd/src/views/common/button/LoadingButton.tsx16
2 files changed, 11 insertions, 11 deletions
diff --git a/FrontEnd/src/views/common/button/IconButton.tsx b/FrontEnd/src/views/common/button/IconButton.tsx
index d9d828e7..3ba56277 100644
--- a/FrontEnd/src/views/common/button/IconButton.tsx
+++ b/FrontEnd/src/views/common/button/IconButton.tsx
@@ -5,11 +5,11 @@ import { PaletteColorType } from "@/palette";
import "./IconButton.css";
-export type IconButtonProps = {
+export interface IconButtonProps extends React.ComponentPropsWithRef<"i"> {
icon: string;
color?: PaletteColorType;
large?: boolean;
-} & React.ComponentPropsWithRef<"i">;
+}
export default function IconButton(props: IconButtonProps): JSX.Element {
const { icon, color, className, large, ...otherProps } = props;
@@ -21,7 +21,7 @@ export default function IconButton(props: IconButtonProps): JSX.Element {
large && "large",
"bi-" + icon,
color ? "cru-" + color : "cru-primary",
- className
+ className,
)}
{...otherProps}
/>
diff --git a/FrontEnd/src/views/common/button/LoadingButton.tsx b/FrontEnd/src/views/common/button/LoadingButton.tsx
index 0804e40d..fceaec27 100644
--- a/FrontEnd/src/views/common/button/LoadingButton.tsx
+++ b/FrontEnd/src/views/common/button/LoadingButton.tsx
@@ -7,13 +7,13 @@ import { PaletteColorType } from "@/palette";
import Spinner from "../Spinner";
-function LoadingButton(
- props: {
- color?: PaletteColorType;
- text?: I18nText;
- loading?: boolean;
- } & React.ComponentPropsWithoutRef<"button">
-): JSX.Element {
+interface LoadingButtonProps extends React.ComponentPropsWithoutRef<"button"> {
+ color?: PaletteColorType;
+ text?: I18nText;
+ loading?: boolean;
+}
+
+function LoadingButton(props: LoadingButtonProps): JSX.Element {
const { t } = useTranslation();
const { color, text, loading, className, children, ...otherProps } = props;
@@ -27,7 +27,7 @@ function LoadingButton(
className={classNames(
"cru-" + (color ?? "primary"),
"cru-button outline",
- className
+ className,
)}
{...otherProps}
>