Skip to content

Commit 807b8f2

Browse files
committed
fix(select-modal): match radio styles to iOS native
1 parent 1b11b82 commit 807b8f2

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,24 @@
11
@import "./select-modal";
2+
@import "../item/item.ios.vars";
3+
@import "../radio/radio.ios.vars";
4+
5+
ion-item {
6+
--inner-padding-end: 0;
7+
}
8+
9+
/**
10+
* The bottom border of the item should only be displayed
11+
* under the text and not the radio icon.
12+
*/
13+
ion-radio::after {
14+
@include position(null, null, 0, calc($radio-ios-icon-width + $item-ios-padding-start));
15+
position: absolute;
16+
17+
width: calc(100% - $radio-ios-icon-width - $item-ios-padding-start); /* Adjust width based on the shift */
18+
19+
border-width: #{0px 0px $item-ios-border-bottom-width 0px};
20+
border-style: #{$item-ios-border-bottom-style};
21+
border-color: #{$item-ios-border-bottom-color};
22+
23+
content: "";
24+
}

core/src/components/select-modal/select-modal.md.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ ion-list ion-radio::part(label) {
1010
@include margin(0);
1111
}
1212

13-
ion-item {
14-
--inner-border-width: 0;
15-
}
16-
1713
.item-radio-checked {
1814
--background: #{ion-color(primary, base, 0.08)};
1915
--background-focused: #{ion-color(primary, base)};

core/src/components/select-modal/select-modal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export class SelectModal implements ComponentInterface {
8181
<ion-radio-group value={checked} onIonChange={(ev) => this.callOptionHandler(ev)}>
8282
{this.options.map((option) => (
8383
<ion-item
84+
lines="none"
8485
class={{
8586
// TODO FW-4784
8687
'item-radio-checked': option.value === checked,

0 commit comments

Comments
 (0)