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

Fix remove stored card confirmation not responsive #3037

Merged
merged 3 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions .changeset/polite-ladybugs-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@adyen/adyen-web': patch
---

Fix the styles for the remove stored card confirmation to ensure responsiveness on smaller devices.
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
@import 'styles/variable-generator';

$color-alert: token(color-background-critical-strong,false);
$color-alert: token(color-background-critical-strong, false);

.adyen-checkout__payment-method__disable-confirmation {
$component-root: &;

display: grid;
grid-template-rows: 0fr;
transition:
grid-template-rows token(animation-duration-moderate) token(animation-easing-linear),
opacity token(animation-duration-moderate) token(animation-easing-standard),
margin-bottom token(animation-duration-fast) token(animation-easing-linear);
background: token(color-background-critical-strong);
font-size: token(text-body-font-size);
color: token(color-label-on-color);
Expand All @@ -11,31 +19,36 @@ $color-alert: token(color-background-critical-strong,false);
overflow: hidden;
opacity: 0;
margin: 0 -17px;
max-height: 0;
transition:
opacity 0.15s ease-out,
max-height 0.15s linear,
margin-bottom 0.1s linear;

&.adyen-checkout__payment-method__disable-confirmation--open {
max-height: 62px;
&__content {
min-height: 0;
transition:
visibility token(animation-duration-moderate) token(animation-easing-linear),
padding token(animation-duration-fast) token(animation-easing-linear);
visibility: hidden;
display: flex;
align-items: center;
justify-content: space-between;
}

&--open {
grid-template-rows: 1fr;
opacity: 1;
margin-bottom: token(spacer-070);
}
}

.adyen-checkout__payment-method__disable-confirmation__content {
display: flex;
align-items: center;
justify-content: space-between;
padding: token(spacer-040) token(spacer-070);
#{$component-root}__content {
visibility: visible;
padding: token(spacer-040) token(spacer-070);
}
}
}

.adyen-checkout__payment-method__disable-confirmation__buttons {
display: flex;
}

.adyen-checkout__payment-method__disable-confirmation__button {
font-size: token(text-body-font-size);
background: token(color-background-critical-strong);
border: token(border-width-s) solid transparent;
border-radius: token(border-radius-m);
Expand Down
5 changes: 2 additions & 3 deletions packages/lib/src/styles/variable-generator.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
@return $adyen-output-map;
}


@function token($token, $generate-css-var: true) {
$adyen-tokens-map: ();

@if $generate-css-var {
$adyen-tokens-map: adyen-sdk-generate-css-variables($color, $text, $focus-ring, $border, $spacer, $shadow, $toggle);
$adyen-tokens-map: adyen-sdk-generate-css-variables($color, $text, $focus-ring, $border, $spacer, $shadow, $animation, $toggle);
} @else {
$adyen-tokens-map: map-merge($color, $text, $focus-ring, $border, $spacer, $shadow, $toggle)
$adyen-tokens-map: map-merge($color, $text, $focus-ring, $border, $spacer, $shadow, $animation, $toggle);
}

@return map-get($adyen-tokens-map, '#{$token}');
Expand Down
Loading