Skip to content

Commit 401eb8f

Browse files
author
Diego Antonelli
committed
Feat: Including styles for tabcontainer badge
1 parent d2e4378 commit 401eb8f

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

styles/native/js/core/widgets/badge.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ To customize any core styling, copy the part you want to customize to styles/nat
1414
export const com_mendix_widget_native_badge_Badge = {
1515
container: {
1616
// All ViewStyle properties are allowed
17+
borderRadius: badge.borderRadius,
1718
backgroundColor: badge.default.backgroundColor,
1819
paddingVertical: badge.paddingVertical,
1920
paddingHorizontal: badge.paddingHorizontal,

styles/native/js/core/widgets/tabcontainer.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { font, spacing, tabContainer } from "../variables";
1+
import { badge, font, spacing, tabContainer } from "../variables";
22
/*
33
44
DISCLAIMER:
@@ -48,4 +48,18 @@ export const TabContainer = {
4848
fontWeight: tabContainer.activeLabel.fontWeight,
4949
textTransform: tabContainer.activeLabel.textTransform,
5050
},
51+
badgeContainer: {
52+
borderRadius: badge.borderRadius,
53+
backgroundColor: badge.default.backgroundColor,
54+
paddingVertical: badge.paddingVertical,
55+
paddingHorizontal: badge.paddingHorizontal,
56+
marginLeft: 8
57+
},
58+
badgeCaption: {
59+
fontSize: font.size,
60+
color: badge.default.color,
61+
fontFamily: font.family,
62+
fontWeight: badge.fontWeight,
63+
marginTop: -1,
64+
}
5165
};

styles/web/sass/core/widgets/_tabcontainer.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,14 @@
8484
}
8585
}
8686
}
87+
88+
.mx-tabcontainer-badge {
89+
margin-left: 8px;
90+
border-radius: $font-size-small;
91+
background-color: $label-primary-bg;
92+
color: $label-primary-color;
93+
font-size: $font-size-small;
94+
font-weight: $font-weight-bold;
95+
line-height: 1;
96+
padding: 3px 7px;
97+
}

0 commit comments

Comments
 (0)