1.3.1 • Published 2 months ago

@equinor/fusion-wc-badge v1.3.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 months ago

fusion-wc-badge Published on npm

Storybook

Installation

npm install @equinor/fusion-wc-badge

Badge <fwc-badge>

Example Usage

Default

return (
  <fwc-badge>10</fwc-badge>
);

Sizes

return (
  <fwc-badge icon="settings" size="small" />
  <fwc-badge icon="settings" size="medium" />
  <fwc-badge icon="settings" size="large" />
);

Positions

return (
  <fwc-badge position="top-left" />
  <fwc-badge position="top-right" />
  <fwc-badge position="bottom-left" />
  <fwc-badge position="bottom-right" />
);

Icon

return (
  <fwc-badge icon="settings" />
);

Circular parent (Use if the parent component is circular instead of rectangular for correct positioning)

return (
  <fwc-badge circular />
);

Properties/Attributes

NameTypeDefaultDescription
sizeBadgeSize*mediumSize of the badge.
positionBadgePosition**top-rightAbsolute corner position for the badge.
colorBadgeColor***secondaryColor of the badge.
valuestring | Text value to be rendered within the badge.
iconIconName**** | Icon to be rendered within the badge.
circularbooleanfalseSet to true if badge is placed within a circular wrapper for correct position.
tooltipstring | Tooltip text to show on hover.

* BadgeSize is exported by fwc-badge.

type BadgeSize = 'small' | 'medium' | 'large';

** BadgePosition is exported by fwc-badge.

type BadgePosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';

*** BadgeColor is exported by fwc-badge.

type BadgeColor = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'disabled';

**** IconName is exported by fwc-icon and is based on EDS icon tokens.

type IconName = 'calendar' | 'settings'...;
1.3.1

2 months ago

1.2.0

7 months ago

1.1.0

7 months ago

1.0.1

7 months ago

1.0.0

8 months ago

1.3.0

6 months ago

1.2.1

7 months ago

0.2.34

8 months ago

0.2.33

8 months ago

0.2.33-next.0

8 months ago

0.2.33-next.1

8 months ago

0.2.30

1 year ago

0.2.32

11 months ago

0.2.31

1 year ago

0.2.29

1 year ago

0.2.27

2 years ago

0.2.26

2 years ago

0.2.28

1 year ago

0.2.25

2 years ago

0.2.24

2 years ago

0.2.23

2 years ago

0.2.22

2 years ago

0.2.21

2 years ago

0.2.20

2 years ago

0.2.19

2 years ago

0.2.18

2 years ago

0.2.16

3 years ago

0.2.15

3 years ago

0.2.14

3 years ago

0.2.17

3 years ago

0.2.13

3 years ago

0.2.11

3 years ago

0.2.10

3 years ago

0.2.9

3 years ago

0.2.8

3 years ago

0.2.6

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago