1.3.2 • Published 10 months ago
@equinor/fusion-wc-badge v1.3.2
fusion-wc-badge

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
Name | Type | Default | Description |
---|---|---|---|
size | BadgeSize* | medium | Size of the badge. |
position | BadgePosition** | top-right | Absolute corner position for the badge. |
color | BadgeColor*** | secondary | Color of the badge. |
value | string | | Text value to be rendered within the badge. | |
icon | IconName**** | | Icon to be rendered within the badge. | |
circular | boolean | false | Set to true if badge is placed within a circular wrapper for correct position. |
tooltip | string | | 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.2
10 months ago
1.3.1
1 year ago
1.2.0
2 years ago
1.1.0
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago
1.3.0
2 years ago
1.2.1
2 years ago
0.2.34
2 years ago
0.2.33
2 years ago
0.2.33-next.0
2 years ago
0.2.33-next.1
2 years ago
0.2.30
2 years ago
0.2.32
2 years ago
0.2.31
2 years ago
0.2.29
2 years ago
0.2.27
3 years ago
0.2.26
3 years ago
0.2.28
3 years ago
0.2.25
3 years ago
0.2.24
3 years ago
0.2.23
3 years ago
0.2.22
3 years ago
0.2.21
3 years ago
0.2.20
3 years ago
0.2.19
3 years ago
0.2.18
3 years ago
0.2.16
4 years ago
0.2.15
4 years ago
0.2.14
4 years ago
0.2.17
4 years ago
0.2.13
4 years ago
0.2.11
4 years ago
0.2.10
4 years ago
0.2.9
4 years ago
0.2.8
4 years ago
0.2.6
4 years ago
0.2.5
4 years ago
0.2.4
4 years ago
0.2.3
4 years ago
0.2.2
4 years ago
0.2.1
4 years ago