Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/components/buttons/buttons.ionic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// --------------------------------------------------

::slotted(*) .button-clear {
--color: globals.$ion-primitives-neutral-1200;
--color: #{globals.$ion-primitives-neutral-1200};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed this while updating the styles.

--background: transparent;
--background-activated: transparent;
--background-focused: transparent;
Expand Down
21 changes: 3 additions & 18 deletions core/src/components/datetime/datetime.common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -153,30 +153,15 @@
overflow: hidden;
}

// Calendar / Header / Action Buttons
// Calendar / Footer / Action Buttons
// -----------------------------------

:host .datetime-action-buttons.has-clear-button {
width: 100%;
}

:host .datetime-action-buttons ion-buttons {
display: flex;

justify-content: space-between;
}

/**
* The confirm and clear buttons are grouped in a
* container so that they appear on the end opposite
* of the cancel button.
* We use display: flex so that the
* wrapper only takes up as much
* height as it needs.
*/
.datetime-action-buttons .datetime-action-buttons-container {
display: flex;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These only apply to the native styles.

// Calendar / Header / Action Buttons
// -----------------------------------

/**
* Date/Year button should be on
Expand Down
13 changes: 13 additions & 0 deletions core/src/components/datetime/datetime.ionic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,16 @@
background-color: globals.$ion-primitives-neutral-100;
color: globals.$ion-primitives-neutral-1200;
}

// Calendar / Footer / Action Buttons
// -----------------------------------

:host .datetime-buttons ion-buttons {
display: block;
}

:host .datetime-buttons ion-buttons ion-button {
@include globals.typography(globals.$ion-body-action-lg);

min-height: globals.$ion-space-1200;
}
21 changes: 21 additions & 0 deletions core/src/components/datetime/datetime.native.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,24 @@ ion-picker {
--highlight-border-radius: var(--wheel-highlight-border-radius);
--fade-background-rgb: var(--wheel-fade-background-rgb);
}

// Calendar / Footer / Action Buttons
// -----------------------------------

:host .datetime-action-buttons ion-buttons {
display: flex;

justify-content: space-between;
}

/**
* The confirm and clear buttons are grouped in a
* container so that they appear on the end opposite
* of the cancel button.
* We use display: flex so that the
* wrapper only takes up as much
* height as it needs.
*/
.datetime-action-buttons .datetime-action-buttons-container {
display: flex;
}
5 changes: 5 additions & 0 deletions core/src/components/datetime/datetime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1516,6 +1516,7 @@ export class Datetime implements ComponentInterface {
*/

private renderFooter() {
const theme = getIonTheme(this);
const { disabled, readonly, showDefaultButtons, showClearButton } = this;
/**
* The cancel, clear, and confirm buttons
Expand Down Expand Up @@ -1557,6 +1558,7 @@ export class Datetime implements ComponentInterface {
color={this.color}
onClick={() => this.cancel(true)}
disabled={isButtonDisabled}
expand={theme === 'ionic' ? 'full' : undefined}
>
{this.cancelText}
</ion-button>
Expand All @@ -1568,6 +1570,7 @@ export class Datetime implements ComponentInterface {
color={this.color}
onClick={() => clearButtonClick()}
disabled={isButtonDisabled}
expand={theme === 'ionic' ? 'full' : undefined}
>
{this.clearText}
</ion-button>
Expand All @@ -1578,6 +1581,8 @@ export class Datetime implements ComponentInterface {
color={this.color}
onClick={() => this.confirm(true)}
disabled={isButtonDisabled}
expand={theme === 'ionic' ? 'full' : undefined}
fill={theme === 'ionic' ? 'solid' : undefined}
>
{this.doneText}
</ion-button>
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/datetime/test/basic/datetime.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
});
});

configs().forEach(({ title, screenshot, config }) => {
configs({ modes: ['ios', 'md', 'ionic-md'] }).forEach(({ title, screenshot, config }) => {
test.describe(title('datetime: footer'), () => {
test('should render default buttons', async ({ page }) => {
await page.setContent('<ion-datetime value="2022-05-03" show-default-buttons="true"></ion-datetime>', config);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading