aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/views/common/button/TextButton.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'FrontEnd/src/views/common/button/TextButton.tsx')
-rw-r--r--FrontEnd/src/views/common/button/TextButton.tsx31
1 files changed, 4 insertions, 27 deletions
diff --git a/FrontEnd/src/views/common/button/TextButton.tsx b/FrontEnd/src/views/common/button/TextButton.tsx
index 1a2bac94..1d8e7a4b 100644
--- a/FrontEnd/src/views/common/button/TextButton.tsx
+++ b/FrontEnd/src/views/common/button/TextButton.tsx
@@ -1,39 +1,16 @@
import React from "react";
-import { useTranslation } from "react-i18next";
-import classNames from "classnames";
-import { convertI18nText, I18nText } from "@/common";
-import { PaletteColorType } from "@/palette";
+import { CommonButtonProps } from "./common";
+import Button from "./Button";
import "./TextButton.css";
function _TextButton(
- {
- text,
- color,
- onClick,
- className,
- style,
- }: {
- text: I18nText;
- color?: PaletteColorType;
- onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
- className?: string;
- style?: React.CSSProperties;
- },
+ props: CommonButtonProps,
ref: React.ForwardedRef<HTMLButtonElement>
): React.ReactElement | null {
- const { t } = useTranslation();
-
return (
- <button
- ref={ref}
- className={classNames("cru-text-button", color ?? "primary", className)}
- onClick={onClick}
- style={style}
- >
- {convertI18nText(text, t)}
- </button>
+ <Button ref={ref} customButtonClassName="cru-flat-button" {...props} />
);
}