Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(datetime): update ionic styles for footer buttons #30014

Open
wants to merge 4 commits into
base: next
Choose a base branch
from

Conversation

thetaPC
Copy link
Contributor

@thetaPC thetaPC commented Nov 12, 2024

Issue number: internal


What is the current behavior?

The footer buttons (confirm, clear, and cancel) do not match the ionic theme styles.

What is the new behavior?

  • Update the styles to mimic the design.
  • Footer buttons render full width when the theme is ionic.
  • The confirm button renders as a solid fill when the theme is ionic.
  • Added snapshots.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Preview

Copy link

vercel bot commented Nov 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2024 10:05pm

@github-actions github-actions bot added the package: core @ionic/core package label Nov 12, 2024
@@ -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.

Comment on lines 163 to 179
: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.

Copy link
Member

@brandyscarney brandyscarney left a comment

Choose a reason for hiding this comment

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

Looks good besides the missing gap!

// -----------------------------------

:host .datetime-buttons ion-buttons {
display: block;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
display: block;
display: flex;
flex-flow: column;
align-items: stretch;
gap: globals.$ion-space-250;

If you want to implement this in a different way that's fine but it looks like there is a gap in Figma between buttons.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants