diff options
author | crupest <crupest@outlook.com> | 2023-07-31 20:57:11 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2023-07-31 20:57:11 +0800 |
commit | 00c3736c3818053859710a2fbaec837dd9cbb586 (patch) | |
tree | 46d4b5efd2a82f9da67f8eea508e5b50c76b21ca /FrontEnd/src/views/common/Icon.tsx | |
parent | f0f1984405db795d5a60bd03d05bec524dc12db3 (diff) | |
download | timeline-00c3736c3818053859710a2fbaec837dd9cbb586.tar.gz timeline-00c3736c3818053859710a2fbaec837dd9cbb586.tar.bz2 timeline-00c3736c3818053859710a2fbaec837dd9cbb586.zip |
...
Diffstat (limited to 'FrontEnd/src/views/common/Icon.tsx')
-rw-r--r-- | FrontEnd/src/views/common/Icon.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/FrontEnd/src/views/common/Icon.tsx b/FrontEnd/src/views/common/Icon.tsx index c91d514b..2ac3a7ca 100644 --- a/FrontEnd/src/views/common/Icon.tsx +++ b/FrontEnd/src/views/common/Icon.tsx @@ -14,13 +14,14 @@ interface IconButtonProps extends ComponentPropsWithoutRef<"i"> { export default function Icon(props: IconButtonProps) { const { icon, color, size, style, className, ...otherProps } = props; - const colorName = color === "on-surface" ? "surface-on" : color ?? "primary"; + const colorName = color === "on-surface" ? "surface-on" : color; return ( <i style={size != null ? { ...style, fontSize: size } : style} className={classNames( - `bi-${icon} cru-${colorName}-color cru-icon`, + colorName && `cru-${colorName}`, + `bi-${icon} cru-icon`, className, )} {...otherProps} |