generated from MetaMask/metamask-module-template
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: adding initial avatar network component
- Loading branch information
1 parent
9ca05a2
commit 35ece8d
Showing
16 changed files
with
609 additions
and
60 deletions.
There are no files selected for viewing
12 changes: 6 additions & 6 deletions
12
packages/design-system-react/src/components/avatar-base/AvatarBase.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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { AvatarBaseSize } from './AvatarBase.types'; | ||
|
||
export const AVATAR_BASE_SIZE_DIMENSIONS: Record<AvatarBaseSize, string> = { | ||
[AvatarBaseSize.Xs]: 'h-4 w-4 text-s-body-xs', | ||
[AvatarBaseSize.Sm]: 'h-6 w-6 text-s-body-sm', | ||
[AvatarBaseSize.Md]: 'h-8 w-8 text-s-body-md', | ||
[AvatarBaseSize.Lg]: 'h-10 w-10 text-s-body-lg', | ||
[AvatarBaseSize.Xl]: 'h-12 w-12 text-s-body-lg', | ||
export const AVATAR_BASE_SIZE_CLASS_MAP: Record<AvatarBaseSize, string> = { | ||
[AvatarBaseSize.Xs]: 'h-4 w-4', | ||
[AvatarBaseSize.Sm]: 'h-6 w-6', | ||
[AvatarBaseSize.Md]: 'h-8 w-8', | ||
[AvatarBaseSize.Lg]: 'h-10 w-10', | ||
[AvatarBaseSize.Xl]: 'h-12 w-12', | ||
}; |
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
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
3 changes: 3 additions & 0 deletions
3
packages/design-system-react/src/components/avatar-base/index.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,3 @@ | ||
export { AvatarBase } from './AvatarBase'; | ||
export type { AvatarBaseProps } from './AvatarBase.types'; | ||
export { AvatarBaseSize, AvatarBaseShape } from './AvatarBase.types'; |
16 changes: 16 additions & 0 deletions
16
packages/design-system-react/src/components/avatar-network/AvatarNetwork.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,16 @@ | ||
// Remove this file if it's not needed | ||
export const AVATARNETWORK_CLASSMAP = {}; | ||
|
||
import { AvatarBaseSize } from '../avatar-base'; | ||
import { TextVariant } from '../text'; | ||
|
||
export const AVATAR_NETWORK_SIZE_TO_TEXT_VARIANT_MAP: Record< | ||
AvatarBaseSize, | ||
TextVariant | ||
> = { | ||
[AvatarBaseSize.Xs]: TextVariant.BodyXs, | ||
[AvatarBaseSize.Sm]: TextVariant.BodyXs, | ||
[AvatarBaseSize.Md]: TextVariant.BodySm, | ||
[AvatarBaseSize.Lg]: TextVariant.BodyMd, | ||
[AvatarBaseSize.Xl]: TextVariant.BodyMd, | ||
}; |
Oops, something went wrong.