-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(UserInfo): added size variants.
- Loading branch information
1 parent
c209d73
commit fcf3c05
Showing
5 changed files
with
188 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
packages/core/src/components/UserInfo/components/UserInfoAvatar/constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { TUserInfoFormat, TUserInfoSize } from '../../declarations'; | ||
import type { TypographyProps } from '../../../Typography'; | ||
import { AvatarProps } from '../../../Avatar'; | ||
|
||
export const USER_INFO_SIZE_HEADING_FORMAT_MAP: { | ||
[key in TUserInfoSize]: TypographyProps['format']; | ||
} = { | ||
sm: 'heading-h6', | ||
md: 'heading-h4', | ||
lg: 'heading-h3', | ||
}; | ||
|
||
export const USER_INFO_SIZE_SUBTITLE_FORMAT_MAP: { | ||
[key in TUserInfoSize]: TypographyProps['format']; | ||
} = { | ||
sm: 'body-xs', | ||
md: 'body-sm', | ||
lg: 'body-md', | ||
}; | ||
|
||
export const USER_INFO_SIZE_AVATAR_MAP: { | ||
[key in TUserInfoFormat]: { | ||
[key in TUserInfoSize]: AvatarProps['size']; | ||
}; | ||
} = { | ||
base: { | ||
sm: 'xxxs', | ||
md: 'xxs', | ||
lg: 'xs', | ||
}, | ||
bold: { | ||
sm: 'xxxs', | ||
md: 'xxs', | ||
lg: 'xs', | ||
}, | ||
heading: { | ||
sm: 'md', | ||
md: 'lg', | ||
lg: 'xl', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters