chore: add neutral-subtle for text and update avatar sizes (#36945)

This commit is contained in:
Pawan Kumar 2024-10-17 17:15:30 +05:30 committed by GitHub
parent 44a9994fa9
commit 6a6ee9a84d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 7 deletions

View File

@ -2,18 +2,18 @@
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: var(--sizing-8); width: var(--icon-size-3);
height: var(--sizing-8); height: var(--icon-size-3);
} }
.avatar[data-size="small"] { .avatar[data-size="small"] {
width: var(--sizing-6); width: var(--icon-size-2);
height: var(--sizing-6); height: var(--icon-size-2);
} }
.avatar[data-size="large"] { .avatar[data-size="large"] {
width: var(--sizing-10); width: var(--icon-size-4);
height: var(--sizing-10); height: var(--icon-size-4);
} }
/* if the avatar has div, that means no source is provided. For this case, we want to add a background color and border radius */ /* if the avatar has div, that means no source is provided. For this case, we want to add a background color and border radius */

View File

@ -10,6 +10,11 @@
color: var(--color-fg-$(color)); color: var(--color-fg-$(color));
} }
} }
/* Adding as special case as we can't add neutral-subtle to $colors variable, as that variable is used generically for many components ( button ). */
&[data-color="neutral-subtle"] {
color: var(--color-fg-neutral-subtle);
}
} }
.clampedText { .clampedText {

View File

@ -13,7 +13,7 @@ export interface TextProps {
/** Color of the text /** Color of the text
* @default inherit * @default inherit
*/ */
color?: keyof typeof COLORS; color?: keyof typeof COLORS | "neutral-subtle";
/** Sets the weight (or boldness) of the font /** Sets the weight (or boldness) of the font
* @default false * @default false
*/ */