Skip to content

Commit 851ba65

Browse files
🐛 fix: Fix Avatar
1 parent 86749b4 commit 851ba65

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Avatar/style.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const useStyles = createStyles(
77
{ background, size, isEmoji }: { background?: string; isEmoji?: boolean; size: number },
88
) => {
99
const backgroundColor = background ?? token.colorBgContainer;
10-
const color = readableColor(backgroundColor);
10+
const color = backgroundColor ? readableColor(backgroundColor) : token.colorText;
1111

1212
return {
1313
avatar: css`

src/ColorSwatches/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const ColorSwatches = memo<ColorSwatchesProps>(
6666
<Tooltip key={c.label} title={c.label}>
6767
<Center
6868
className={cx(styles.container, isActive && styles.active)}
69-
onClick={() => setActive(c.color)}
69+
onClick={() => setActive(c.color || undefined)}
7070
style={{
7171
background: color,
7272
borderRadius: shape === 'circle' ? '50%' : theme.borderRadius,

0 commit comments

Comments
 (0)