DocSpace-client/packages/asc-web-components/badge
2021-12-29 18:30:05 +03:00
..
badge.stories.js Web: Components: refactoring stories, add public/images to components for storybook 2021-03-07 14:57:26 +03:00
badge.test.js Web: Components: changed component hierarchy 2021-02-24 17:42:09 +03:00
index.js Fix after merge 2021-12-29 18:30:05 +03:00
README.md Web: Components/Common: fix imports 2021-02-26 00:19:45 +03:00
styled-badge.js Web:Files:Badges: Added new props lineHeight, textAlign to Badge styles. Added new conditions for resizing badges to the Badges and QuickButtons components. Added new props sectionWidth to HOCs withBadges and withQuickButtons. Styling badges. 2021-12-20 15:14:32 +03:00

Badge

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

Usage

import Badge from "@appserver/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