Skip to content

Commit 9c293ec

Browse files
fix(badge): wrong shape in bootstrap theme (#12727)
* fix(badge): wrong shape in bootstrap theme --------- Co-authored-by: Simeon Simeonoff <[email protected]>
1 parent 87a6166 commit 9c293ec

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ All notable changes for each version of this project will be documented in this
2323
- **Breaking Change** The `onSlideChanged`, `onSlideAdded`, `onSlideRemoved`, `onCarouselPaused` and `onCarouselPlaying` outputs have been renamed to `slideChanged`, `slideAdded`, `slideRemoved`, `carouselPaused` and `carouselPlaying` to not violate the no on-prefixed outputs convention. Automatic migrations are available and will be applied on `ng update`.
2424
- `IgxRadio`, `IgxRadioGroup`
2525
- Added component validation along with styles for invalid state
26+
- `IgxBadge`
27+
- Added `shape` property that controls the shape of the badge and can be either `square` or `rounded`. The default shape of the badge is rounded.
2628
- `IgxAvatar`
2729
- **Breaking Change** The `roundShape` property has been deprecated and will be removed in a future version. Users can control the shape of the avatar by the newly added `shape` attribute that can be `square`, `rounded` or `circle`. The default shape of the avatar is `square`.
2830

projects/igniteui-angular/src/lib/core/styles/components/badge/_badge-theme.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
color: var-get($theme, 'text-color');
109109
line-height: 1;
110110
background: var-get($theme, 'background-color');
111-
border-radius: var-get($theme, 'border-radius');
111+
border-radius: 50%;
112112
box-shadow: var-get($theme, 'shadow');
113113
border-width: var-get($theme, 'border-width');
114114
border-color: var-get($theme, 'border-color');
@@ -128,7 +128,7 @@
128128
}
129129

130130
%igx-badge--square {
131-
border-radius: 0;
131+
border-radius: var-get($theme, 'border-radius');
132132
}
133133

134134
%igx-badge-value {

projects/igniteui-angular/src/lib/core/styles/themes/schemas/light/_badge.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/// @prop {Number} border-width [0] - The border width of the badge component.
1616
/// @prop {Map} background-color [color: ('primary', 500)] - The background color used.
1717
/// @prop {Number} elevation [1] - The elevation level, between 0-24, to be used for the badge shadow.
18-
/// @prop {Number} border-radius [11px] - The border radius used for badge. Can be a fraction between 0 and 1, pixels, or percent.
18+
/// @prop {Number} border-radius [0] - The border radius used for badge. Can be a fraction between 0 and 1, pixels, or percent.
1919
/// @requires {Map} $default-elevation-badge
2020
$light-badge: extend(
2121
$default-elevation-badge,
@@ -40,7 +40,7 @@ $light-badge: extend(
4040

4141
border-width: 0,
4242

43-
border-radius: rem(11px)
43+
border-radius: 0
4444
)
4545
);
4646

0 commit comments

Comments
 (0)