Skip to content

Commit f2984ab

Browse files
committed
test(ac): float
1 parent 94d2c73 commit f2984ab

File tree

2 files changed

+13
-21
lines changed

2 files changed

+13
-21
lines changed

core/src/components/action-sheet/action-sheet.scss

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,11 @@
5050
@include font-smoothing();
5151
@include position(0, 0, 0, 0);
5252

53-
display: block;
54-
position: fixed;
53+
display: flex;
54+
position: absolute;
55+
56+
align-items: center;
57+
justify-content: center;
5558

5659
outline: none;
5760

@@ -67,11 +70,9 @@
6770
}
6871

6972
.action-sheet-wrapper {
70-
@include position(null, 0, 0, 0);
71-
@include transform(translate3d(0, 100%, 0));
73+
display: flex;
7274

73-
display: block;
74-
position: absolute;
75+
flex-direction: column;
7576

7677
width: var(--width);
7778
min-width: var(--min-width);
@@ -96,7 +97,6 @@
9697
outline: none;
9798

9899
background: var(--button-background);
99-
100100
color: var(--button-color);
101101

102102
font-family: inherit;
@@ -178,9 +178,9 @@
178178
// Action Sheet: States
179179
// --------------------------------------------------
180180

181-
// .action-sheet-button::after {
182-
// @include button-state();
183-
// }
181+
.action-sheet-button::after {
182+
@include button-state();
183+
}
184184

185185

186186
// Action Sheet: Selected
@@ -215,11 +215,8 @@
215215
// --------------------------------------------------
216216

217217
.action-sheet-button.ion-focused {
218-
background-color: var(--button-background-focused);
219218
color: var(--button-color-focused);
220219

221-
opacity: var(--button-background-focused-opacity);
222-
223220
&::after {
224221
background: var(--button-background-focused);
225222

core/src/components/action-sheet/action-sheet.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
361361
const mode = getIonMode(this);
362362
const allButtons = this.getButtons();
363363
const cancelButton = allButtons.find((b) => b.role === 'cancel');
364-
// const buttons = allButtons.filter((b) => b.role !== 'cancel');
364+
const buttons = allButtons.filter((b) => b.role !== 'cancel');
365365
const headerID = `action-sheet-${overlayIndex}-header`;
366366

367367
return (
@@ -389,12 +389,7 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
389389

390390
<div class="action-sheet-wrapper ion-overlay-wrapper" ref={(el) => (this.wrapperEl = el)}>
391391
<div class="action-sheet-container">
392-
{header && (
393-
<h2 id={headerID} class="action-sheet-title">
394-
{header}
395-
</h2>
396-
)}
397-
{/* <div class="action-sheet-group" ref={(el) => (this.groupEl = el)}>
392+
<div class="action-sheet-group" ref={(el) => (this.groupEl = el)}>
398393
{header !== undefined && (
399394
<div
400395
id={headerID}
@@ -423,7 +418,7 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
423418
{mode === 'md' && <ion-ripple-effect></ion-ripple-effect>}
424419
</button>
425420
))}
426-
</div> */}
421+
</div>
427422

428423
{cancelButton && (
429424
<div class="action-sheet-group action-sheet-group-cancel">

0 commit comments

Comments
 (0)