Skip to content

Commit cf6d03f

Browse files
committed
top_banner_info refactor
Signed-off-by: Julio Ortega <julio.ortega@dialpad.com>
1 parent 161934c commit cf6d03f

File tree

3 files changed

+30
-10
lines changed

3 files changed

+30
-10
lines changed

packages/dialtone-css/lib/build/less/recipes/top_banner_info.less

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,23 @@
2828
margin: var(--dt-space-300) var(--dt-space-500) var(--dt-space-300) 0;
2929
text-align: right;
3030
}
31+
32+
.d-recipe-top-banner-info--success {
33+
background-color: var(--dt-color-surface-success);
34+
}
35+
36+
.d-recipe-top-banner-info--critical {
37+
background-color: var(--dt-color-surface-critical);
38+
}
39+
40+
.d-recipe-top-banner-info--warning {
41+
background-color: var(--dt-color-surface-warning);
42+
}
43+
44+
.d-recipe-top-banner-info--info {
45+
background-color: var(--dt-color-surface-info);
46+
}
47+
48+
.d-recipe-top-banner-info--primary {
49+
background-color: var(--dt-color-surface-primary);
50+
}

packages/dialtone-vue2/recipes/notices/top_banner_info/top_banner_info.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ describe('DtRecipeTopBannerInfo Tests', () => {
6868
expect(middleContent.text()).toBe(slots.default);
6969
});
7070
it('Should display with default background color', () => {
71-
expect(rootElement.classes()).toContain('d-bgc-success');
71+
expect(rootElement.classes()).toContain('d-recipe-top-banner-info--success');
7272
});
7373
});
7474

@@ -78,7 +78,7 @@ describe('DtRecipeTopBannerInfo Tests', () => {
7878
});
7979

8080
it('Should display with passed background color', () => {
81-
expect(rootElement.classes()).toContain('d-bgc-info');
81+
expect(rootElement.classes()).toContain('d-recipe-top-banner-info--info');
8282
});
8383
});
8484
});

packages/dialtone-vue2/recipes/notices/top_banner_info/top_banner_info.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ export default {
4545
const bgColors = {
4646
// these are too specific, so for now I'm at least updating the resultant semantic value
4747
// TODO: breaking change: update to be more abstract
48-
green300: 'd-bgc-success',
49-
green100: 'd-bgc-success',
50-
red200: 'd-bgc-critical',
51-
red100: 'd-bgc-critical',
52-
gold200: 'd-bgc-warning',
53-
gold100: 'd-bgc-warning',
54-
black100: 'd-bgc-info',
55-
white: 'd-bgc-primary',
48+
green100: 'd-recipe-top-banner-info--success',
49+
green300: 'd-recipe-top-banner-info--success',
50+
red100: 'd-recipe-top-banner-info--critical',
51+
red200: 'd-recipe-top-banner-info--critical',
52+
gold100: 'd-recipe-top-banner-info--warning',
53+
gold200: 'd-recipe-top-banner-info--warning',
54+
black100: 'd-recipe-top-banner-info--info',
55+
white: 'd-recipe-top-banner-info--primary',
5656
};
5757
return [bgColors[this.colorCode]];
5858
},

0 commit comments

Comments
 (0)