aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/views/common/Icon.tsx
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2023-07-31 20:57:11 +0800
committercrupest <crupest@outlook.com>2023-07-31 20:57:11 +0800
commit00c3736c3818053859710a2fbaec837dd9cbb586 (patch)
tree46d4b5efd2a82f9da67f8eea508e5b50c76b21ca /FrontEnd/src/views/common/Icon.tsx
parentf0f1984405db795d5a60bd03d05bec524dc12db3 (diff)
downloadtimeline-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.tsx5
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}