feat: i18n refactor and style adjustment

This commit is contained in:
Yidadaa
2023-04-28 00:34:37 +08:00
parent 6c1144f6f4
commit fb32770486
23 changed files with 266 additions and 156 deletions

View File

@@ -5,10 +5,10 @@ import styles from "./button.module.scss";
export function IconButton(props: {
onClick?: () => void;
icon?: JSX.Element;
type?: "primary" | "danger";
text?: string;
bordered?: boolean;
shadow?: boolean;
noDark?: boolean;
className?: string;
title?: string;
disabled?: boolean;
@@ -19,7 +19,7 @@ export function IconButton(props: {
styles["icon-button"] +
` ${props.bordered && styles.border} ${props.shadow && styles.shadow} ${
props.className ?? ""
} clickable`
} clickable ${styles[props.type ?? ""]}`
}
onClick={props.onClick}
title={props.title}
@@ -29,7 +29,8 @@ export function IconButton(props: {
{props.icon && (
<div
className={
styles["icon-button-icon"] + ` ${props.noDark && "no-dark"}`
styles["icon-button-icon"] +
` ${props.type === "primary" && "no-dark"}`
}
>
{props.icon}