Skip to content

Commit 9c5ca9e

Browse files
committed
refactor(button): new button sample
1 parent 85f4a42 commit 9c5ca9e

2 files changed

Lines changed: 47 additions & 17 deletions

File tree

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
<div class="buttons-sample">
2-
<div class="button-sample">
3-
<button igxButton="contained" igxRipple="#fdfdfd">Styled Button</button>
4-
</div>
5-
<div class="button-sample">
6-
<button igxButton="contained" [disabled]="'true'" igxRipple>Disabled</button>
7-
</div>
8-
</div>
2+
<div class="button-sample">
3+
<button igxButton="contained" igxRipple>Contained Button</button>
4+
</div>
5+
<div class="button-sample">
6+
<button igxButton="flat" igxRipple>Flat Button</button>
7+
</div>
8+
<div class="button-sample">
9+
<button igxButton="outlined" igxRipple>Outlined Button</button>
10+
</div>
11+
<div class="button-sample">
12+
<button igxButton="fab" igxRipple>Fab Button</button>
13+
</div>
14+
<div class="button-sample">
15+
<button igxButton="contained" [disabled]="'true'">Disabled</button>
16+
</div>
17+
</div>
Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,38 @@
11
@use "layout.scss";
22
@use "igniteui-angular/theming" as *;
33

4-
$custom-button-theme: button-theme(
5-
$foreground: #fdfdfd,
6-
$hover-foreground: #fdfdfd,
7-
$focus-foreground: #fdfdfd,
8-
$background: #345779,
9-
$hover-background: #2e4d6b,
10-
$focus-background: #2e4d6b,
11-
$disabled-foreground: #2e4d6b,
4+
$custom-contained-theme: contained-button-theme(
5+
$background: #348ae0,
6+
$hover-background: #2e7bc8,
7+
$focus-visible-background: #2e7bc8
8+
);
9+
10+
$custom-flat-theme: flat-button-theme(
11+
$foreground: var(--ig-error-500-contrast),
12+
$hover-foreground: var(--ig-error-800-contrast),
13+
$focus-visible-foreground: var(--ig-error-800-contrast),
14+
$background: var(--ig-error-500),
15+
$hover-background: var(--ig-error-800),
16+
$focus-visible-background: var(--ig-error-800)
17+
);
18+
19+
$custom-outlined-theme: outlined-button-theme(
20+
$foreground: var(--ig-success-500),
21+
$hover-foreground: var(--ig-success-700),
22+
$focus-foreground: var(--ig-success-700),
23+
$border-color: var(--ig-success-500),
24+
$hover-border-color: var(--ig-success-700),
25+
$focus-border-color: var(--ig-success-700)
26+
);
27+
28+
$custom-fab-theme: fab-button-theme(
29+
$background: #ffc506
1230
);
1331

1432
.button-sample {
15-
@include css-vars($custom-button-theme);
16-
}
33+
@include css-vars($custom-contained-theme);
34+
@include css-vars($custom-flat-theme);
35+
@include css-vars($custom-outlined-theme);
36+
@include css-vars($custom-fab-theme);
37+
};
1738

0 commit comments

Comments
 (0)