-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Avatar): add 2xs Avatar size #1721
Conversation
Preview is ready. |
Visual Tests Report is ready. |
@PahaN47 Please ensure new size is correctly displayed for Avatar related components: |
Let's add |
#{$block}__avatar + #{$block}__info { | ||
margin-inline-start: 6px; | ||
} | ||
|
||
#{$block}__info { | ||
@include user-text-small(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not correct to use code-inline variant for that. It should inherit font from parent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we shouldn't allow 2xs
in User and UserLabel components
src/components/User/README.md
Outdated
| `--g-user-font-size` | Name and description font size for `size='s'` and larger | | ||
| `--g-user-line-height` | Name and description line height for `size='s'` and larger | | ||
| `--g-user-small-font-size` | Name font size for `size='xs'` and smaller | | ||
| `--g-user-small-line-height` | Name line height for `size='xs'` and smaller | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CSS API is designed to ignore all props, so only 2 vars are relevant: --g-user-font-size
, --g-user-line-height
. There should not be CSS API for props variants
src/components/User/constants.ts
Outdated
import type {UserSize} from './types'; | ||
|
||
export const NO_DESCRIPTION_SIZES: UserSize[] = ['xs', '2xs']; | ||
export const DEFAULT_USER_SIZE: UserSize = 'm'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export const DEFAULT_USER_SIZE: UserSize = 'm'; | |
export const DEFAULT_SIZE: UserSize = 'm'; |
src/components/User/constants.ts
Outdated
@@ -0,0 +1,4 @@ | |||
import type {UserSize} from './types'; | |||
|
|||
export const NO_DESCRIPTION_SIZES: UserSize[] = ['xs', '2xs']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export const NO_DESCRIPTION_SIZES: UserSize[] = ['xs', '2xs']; | |
export const COMPACT_SIZES: UserSize[] = ['xs', '2xs']; |
No description provided.