DocSpace-client/packages/shared/components/badge
2023-12-19 10:40:56 +03:00
..
badge.stories.tsx Shared:Components:Badge: rewrite to typescript 2023-12-07 18:17:05 +03:00
Badge.styled.ts Merge branch 'develop' into feature/components-typescript 2023-12-19 10:40:56 +03:00
badge.test.tsx Shared:Components:Badge: rewrite to typescript 2023-12-07 18:17:05 +03:00
Badge.theme.tsx Shared:Components:Badge: rewrite to typescript 2023-12-07 18:17:05 +03:00
Badge.tsx Shared:Components:Badge: rewrite to typescript 2023-12-07 18:17:05 +03:00
Badge.types.ts Fix after merge 'develop' 2023-12-14 13:02:52 +03:00
index.tsx Shared:Components:Badge: rewrite to typescript 2023-12-07 18:17:05 +03:00
README.md Shared:Components:Badge: rewrite to typescript 2023-12-07 18:17:05 +03:00

Badge

Used for buttons, numbers or status markers next to icons.

Usage

import Badge from "@docspace/components/badge";
<Badge
  label="10"
  backgroundColor="#ED7309"
  color="#FFFFFF"
  fontSize="11px"
  fontWeight={800}
  borderRadius="11px"
  padding="0 5px"
  maxWidth="50px"
  onClick={() => {}}
/>

Properties

Props Type Required Values Default Description
backgroundColor string - - #ED7309 CSS background-color
borderRadius string - - 11px CSS border-radius
className string - - - Accepts class
color string - - #FFFFFF CSS color
fontSize string - - 11px CSS font-size
fontWeight number - - 800 CSS font-weight
id string - - - Accepts id
maxWidth string - - 50px CSS max-width
label string - - 0 Value
onClick func - - - onClick event
padding string - - 0 5px CSS padding
style obj, array - - - Accepts css style