badge.tsx 549 B

12345678910111213141516171819202122232425262728
  1. import { memo } from 'react'
  2. import cn from '@/utils/classnames'
  3. type BadgeProps = {
  4. className?: string
  5. text: string
  6. uppercase?: boolean
  7. }
  8. const Badge = ({
  9. className,
  10. text,
  11. uppercase = true,
  12. }: BadgeProps) => {
  13. return (
  14. <div
  15. className={cn(
  16. 'inline-flex items-center px-[5px] h-5 rounded-[5px] border border-divider-deep leading-3 text-text-tertiary',
  17. uppercase ? 'system-2xs-medium-uppercase' : 'system-xs-medium',
  18. className,
  19. )}
  20. >
  21. {text}
  22. </div>
  23. )
  24. }
  25. export default memo(Badge)