Skip to content

Commit a51268c

Browse files
committed
refactor(sass): update windows action sheet sass to use variables
remove unused styles references #5651
1 parent 62c7199 commit a51268c

File tree

2 files changed

+22
-27
lines changed

2 files changed

+22
-27
lines changed

ionic/components/action-sheet/action-sheet.wp.scss

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
// --------------------------------------------------
66

77
$action-sheet-wp-text-align: left !default;
8-
9-
$action-sheet-wp-background-color: #ffffff !default;
8+
$action-sheet-wp-background: #ffffff !default;
109
$action-sheet-wp-box-shadow: 0px -1px 0px rgba(0,0,0,0.2) !default;
10+
$action-sheet-wp-group-margin-bottom: 8px !default;
1111

1212
$action-sheet-wp-title-padding: 19px 16px 17px !default;
1313
$action-sheet-wp-title-font-size: 2.0rem !default;
@@ -19,10 +19,15 @@ $action-sheet-wp-button-text-color: #4D4D4D !default;
1919
$action-sheet-wp-button-font-size: 1.5rem !default;
2020
$action-sheet-wp-button-padding: 0 16px !default;
2121
$action-sheet-wp-button-text-align: $action-sheet-wp-text-align !default;
22-
$action-sheet-wp-button-background-active-color: $list-wp-activated-background-color !default;
22+
$action-sheet-wp-button-background: transparent !default;
23+
$action-sheet-wp-button-background-activated: $list-wp-activated-background-color !default;
2324

25+
$action-sheet-wp-icon-min-width: 24px !default;
26+
$action-sheet-wp-icon-text-align: center !default;
27+
$action-sheet-wp-icon-vertical-align: middle !default;
2428
$action-sheet-wp-icon-font-size: 2.4rem !default;
25-
$action-sheet-wp-icon-margin: 0 28px 0 0 !default;
29+
$action-sheet-wp-icon-margin: 0 16px 0 0 !default;
30+
2631

2732
.action-sheet-wrapper {
2833
box-shadow: $action-sheet-wp-box-shadow;
@@ -36,44 +41,34 @@ $action-sheet-wp-icon-margin: 0 28px 0 0 !default;
3641
}
3742

3843
.action-sheet-button {
39-
position: relative;
40-
overflow: hidden;
4144
padding: $action-sheet-wp-button-padding;
4245
min-height: $action-sheet-wp-button-height;
4346
font-size: $action-sheet-wp-button-font-size;
44-
font-weight: normal;
4547
color: $action-sheet-wp-button-text-color;
46-
background-color: transparent;
48+
background: $action-sheet-wp-button-background;
4749
text-align: $action-sheet-wp-button-text-align;
4850

4951
&.activated {
50-
background: $action-sheet-wp-button-background-active-color;
51-
border-radius: 0;
52-
box-shadow: none;
52+
background: $action-sheet-wp-button-background-activated;
5353
}
5454
}
5555

5656
.action-sheet-icon {
57-
display: inline-block;
5857
margin: $action-sheet-wp-icon-margin;
59-
min-width: 24px;
60-
text-align: center;
61-
vertical-align: middle;
58+
min-width: $action-sheet-wp-icon-min-width;
59+
text-align: $action-sheet-wp-icon-text-align;
60+
vertical-align: $action-sheet-wp-icon-vertical-align;
6261
font-size: $action-sheet-wp-icon-font-size;
6362
}
6463

6564
.action-sheet-group {
66-
overflow: hidden;
67-
margin: 0;
68-
border-radius: 0;
69-
background-color: $action-sheet-wp-background-color;
65+
background: $action-sheet-wp-background;
7066

7167
&:last-child .action-sheet-button {
72-
margin-bottom: 8px;
68+
margin-bottom: $action-sheet-wp-group-margin-bottom;
7369
}
7470
}
7571

7672
.action-sheet-cancel {
77-
background-color: $action-sheet-wp-background-color;
78-
border: none;
73+
background: $action-sheet-wp-button-background;
7974
}

ionic/components/action-sheet/test/basic/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@ class E2EPage {
1818
{
1919
text: 'Delete',
2020
role: 'destructive',
21-
icon: this.platform.is('android') ? 'trash' : null,
21+
icon: !this.platform.is('ios') ? 'trash' : null,
2222
handler: () => {
2323
console.log('Delete clicked');
2424
this.result = 'Deleted';
2525
}
2626
},
2727
{
2828
text: 'Share',
29-
icon: this.platform.is('android') ? 'share' : null,
29+
icon: !this.platform.is('ios') ? 'share' : null,
3030
handler: () => {
3131
console.log('Share clicked');
3232
this.result = 'Shared';
3333
}
3434
},
3535
{
3636
text: 'Play',
37-
icon: this.platform.is('android') ? 'arrow-dropright-circle' : null,
37+
icon: !this.platform.is('ios') ? 'arrow-dropright-circle' : null,
3838
handler: () => {
3939
let modal = Modal.create(ModalPage);
4040
this.nav.present(modal);
@@ -45,7 +45,7 @@ class E2EPage {
4545
},
4646
{
4747
text: 'Favorite',
48-
icon: this.platform.is('android') ? 'heart' : null,
48+
icon: !this.platform.is('ios') ? 'heart' : null,
4949
handler: () => {
5050
console.log('Favorite clicked');
5151
this.result = 'Favorited';
@@ -54,7 +54,7 @@ class E2EPage {
5454
{
5555
text: 'Cancel',
5656
role: 'cancel', // will always sort to be on the bottom
57-
icon: this.platform.is('android') ? 'close' : null,
57+
icon: !this.platform.is('ios') ? 'close' : null,
5858
handler: () => {
5959
console.log('Cancel clicked');
6060
this.result = 'Canceled';

0 commit comments

Comments
 (0)