-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: improve drop-in animation * refactor: fix ideal overflow issue due to animation * fix the label line-height * refactor: fix the selected IssuerButton.scss * refactor(personal-details): add the changes back * fix: remove the pm list rendering logic by only checking the regular pm methods * refactor(drop-in): add support for showing both radio and non-radio buttons * refactor(open-invoice): use consent checkbox style to delivery address * refactor: various fixes for style consistency
- Loading branch information
1 parent
d3ccb8a
commit af6b3ad
Showing
33 changed files
with
210 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...ges/lib/src/components/Dropin/components/PaymentMethod/PaymentMethodItem/ExpandButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import classNames from 'classnames'; | ||
import { ComponentChildren, h } from 'preact'; | ||
|
||
interface ExpandButton { | ||
buttonId: string; | ||
isSelected: boolean; | ||
expandContentId: string; | ||
children: ComponentChildren; | ||
showRadioButton?: boolean; | ||
} | ||
|
||
export function ExpandButton({ buttonId, showRadioButton, isSelected, expandContentId, children }: Readonly<ExpandButton>) { | ||
return ( | ||
// See discussion: https://github.com/w3c/aria/issues/1404 | ||
// eslint-disable-next-line jsx-a11y/role-supports-aria-props | ||
<button | ||
className="adyen-checkout__payment-method__header__title" | ||
id={buttonId} | ||
role={'radio'} | ||
aria-checked={isSelected} | ||
aria-expanded={isSelected} | ||
aria-controls={expandContentId} | ||
type="button" | ||
> | ||
{showRadioButton && ( | ||
<span | ||
className={classNames({ | ||
'adyen-checkout__payment-method__radio': true, | ||
'adyen-checkout__payment-method__radio--selected': isSelected | ||
})} | ||
aria-hidden="true" | ||
/> | ||
)} | ||
{children} | ||
</button> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.