diff options
Diffstat (limited to 'FrontEnd/src/views/common/button')
-rw-r--r-- | FrontEnd/src/views/common/button/Button.tsx | 2 | ||||
-rw-r--r-- | FrontEnd/src/views/common/button/FlatButton.tsx | 2 | ||||
-rw-r--r-- | FrontEnd/src/views/common/button/IconButton.tsx | 8 | ||||
-rw-r--r-- | FrontEnd/src/views/common/button/LoadingButton.tsx | 18 |
4 files changed, 15 insertions, 15 deletions
diff --git a/FrontEnd/src/views/common/button/Button.tsx b/FrontEnd/src/views/common/button/Button.tsx index 1e4163ff..c5976909 100644 --- a/FrontEnd/src/views/common/button/Button.tsx +++ b/FrontEnd/src/views/common/button/Button.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import * as React from "react"; import classNames from "classnames"; import { useTranslation } from "react-i18next"; diff --git a/FrontEnd/src/views/common/button/FlatButton.tsx b/FrontEnd/src/views/common/button/FlatButton.tsx index a6377708..b42c5b3a 100644 --- a/FrontEnd/src/views/common/button/FlatButton.tsx +++ b/FrontEnd/src/views/common/button/FlatButton.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import * as React from "react"; import { useTranslation } from "react-i18next"; import classNames from "classnames"; diff --git a/FrontEnd/src/views/common/button/IconButton.tsx b/FrontEnd/src/views/common/button/IconButton.tsx index 74d7dd36..3ba56277 100644 --- a/FrontEnd/src/views/common/button/IconButton.tsx +++ b/FrontEnd/src/views/common/button/IconButton.tsx @@ -1,15 +1,15 @@ -import React from "react"; +import * as React from "react"; import classNames from "classnames"; 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 2764f92e..fceaec27 100644 --- a/FrontEnd/src/views/common/button/LoadingButton.tsx +++ b/FrontEnd/src/views/common/button/LoadingButton.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import * as React from "react"; import classNames from "classnames"; import { useTranslation } from "react-i18next"; @@ -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} > |