Skip to content

Commit cd4cae1

Browse files
committed
fix(snackbar): style component using sass theme
1 parent cadc7f9 commit cd4cae1

File tree

6 files changed

+12
-28
lines changed

6 files changed

+12
-28
lines changed

src/components/snackbar/themes/shared/snackbar.bootstrap.scss

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/components/snackbar/themes/shared/snackbar.common.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ $theme: $material;
99
background: var-get($theme, 'background');
1010
box-shadow: var-get($theme, 'elevation');
1111
}
12+
13+
igc-button::part(base),
14+
igc-button::part(base):hover {
15+
color: var-get($theme, 'button-color');
16+
background: transparent;
17+
}

src/components/snackbar/themes/shared/snackbar.fluent.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ $theme: $fluent;
77
@include type-style('caption');
88
}
99

10-
igc-button::part(base),
11-
igc-button::part(base):hover {
12-
color: var-get($theme, 'button-color');
13-
}
14-
1510
igc-button::part(base):focus-visible::after {
1611
display: none;
1712
}

src/components/snackbar/themes/shared/snackbar.indigo.scss

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,7 @@
33

44
$theme: $indigo;
55

6-
:host {
7-
igc-button {
8-
--ig-size: 2;
9-
}
10-
}
11-
126
[part~='base'] {
137
min-height: rem(36px);
148
padding: pad-block(rem(4px)) pad-inline(rem(16px));
159
}
16-
17-
igc-button::part(base),
18-
igc-button::part(base):hover {
19-
color: var-get($theme, 'button-color');
20-
box-shadow: none;
21-
}

src/components/snackbar/themes/snackbar.base.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
font-family: var(--ig-font-family);
77
inset-inline: 50% auto;
88
transform: translateX(calc(-50% + .5px));
9+
10+
igc-button {
11+
--ig-size: 2;
12+
}
913
}
1014

1115
:host([position='bottom']) {

src/components/snackbar/themes/themes.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { styles as indigoLight } from './light/snackbar.indigo.css.js';
1313
import { styles as materialLight } from './light/snackbar.material.css.js';
1414
import { styles as shared } from './light/snackbar.shared.css.js';
1515
// Shared Styles
16-
import { styles as bootstrap } from './shared/snackbar.bootstrap.css.js';
1716
import { styles as fluent } from './shared/snackbar.fluent.css.js';
1817
import { styles as indigo } from './shared/snackbar.indigo.css.js';
1918

@@ -22,7 +21,7 @@ const light = {
2221
${shared}
2322
`,
2423
bootstrap: css`
25-
${bootstrap} ${bootstrapLight}
24+
${bootstrapLight}
2625
`,
2726
material: css`
2827
${materialLight}
@@ -40,7 +39,7 @@ const dark = {
4039
${shared}
4140
`,
4241
bootstrap: css`
43-
${bootstrap} ${bootstrapDark}
42+
${bootstrapDark}
4443
`,
4544
material: css`
4645
${materialDark}

0 commit comments

Comments
 (0)