UNPKG

@metamask/design-system-react-native

Version:
1 lines 1.47 kB
{"version":3,"file":"BadgeCount.constants.cjs","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.constants.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAC7C,4CAAsC;AAEtC,WAAW;AACE,QAAA,+BAA+B,GAGxC;IACF,CAAC,sBAAc,CAAC,EAAE,CAAC,EAAE,kBAAW,CAAC,MAAM;IACvC,CAAC,sBAAc,CAAC,EAAE,CAAC,EAAE,kBAAW,CAAC,MAAM;CACxC,CAAC;AACW,QAAA,8BAA8B,GAAmC;IAC5E,CAAC,sBAAc,CAAC,EAAE,CAAC,EAAE,gBAAgB;IACrC,CAAC,sBAAc,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,mBAAmB;CACtD,CAAC;AAEW,QAAA,oCAAoC,GAG7C;IACF,CAAC,sBAAc,CAAC,EAAE,CAAC,EAAE,yBAAyB;IAC9C,CAAC,sBAAc,CAAC,EAAE,CAAC,EAAE,2BAA2B,EAAE,wEAAwE;CAC3H,CAAC","sourcesContent":["import { BadgeCountSize } from '../../types';\nimport { TextVariant } from '../Text';\n\n// Mappings\nexport const MAP_BADGECOUNT_SIZE_TEXTVARIANT: Record<\n BadgeCountSize,\n TextVariant\n> = {\n [BadgeCountSize.Md]: TextVariant.BodyXs,\n [BadgeCountSize.Lg]: TextVariant.BodySm,\n};\nexport const MAP_BADGECOUNT_SIZE_LINEHEIGHT: Record<BadgeCountSize, string> = {\n [BadgeCountSize.Md]: 'leading-[14px]', // line-height 14px\n [BadgeCountSize.Lg]: 'leading-4', // line-height 16px\n};\n\nexport const TWCLASSMAP_BADGECOUNT_SIZE_CONTAINER: Record<\n BadgeCountSize,\n string\n> = {\n [BadgeCountSize.Md]: 'min-w-4 h-3.5 py-0 px-1', // min-width 16px, height 14px, padding-vertical 0, padding-horizontal 4\n [BadgeCountSize.Lg]: 'min-w-6 h-5 py-0.5 px-1.5', // min-width 24px, height 20px, padding-vertical 2, padding-horizontal 6\n};\n"]}