Skip to content

Commit

Permalink
feat: add labels to the elements in the receive screens
Browse files Browse the repository at this point in the history
  • Loading branch information
volfiros committed Sep 17, 2023
1 parent d903735 commit e61cf7c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/app/components/IconLinkCard/IconLinkCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ export function IconLinkCard({
<div
className="shadow rounded-md p-4 bg-white dark:bg-surface-01dp hover:bg-gray-50 dark:hover:bg-surface-02dp text-gray-800 dark:text-neutral-200 cursor-pointer flex flex-row items-center gap-3"
onClick={onClick}
tabIndex={0}
aria-label={title}
onKeyUp={(e) => {
if (e.key === "Enter") {
onClick();
}
}}
>
<div className="flex-shrink-0 flex justify-center md:px-3">{icon}</div>
<div className="flex-grow">
Expand Down
5 changes: 4 additions & 1 deletion src/app/components/QRCode/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ export type Props = {
value: string;
size?: number;
className?: string;
label?: string;
};

export default function QRCode({ value, size, className }: Props) {
export default function QRCode({ value, size, className, label }: Props) {
const theme = useTheme();
const fgColor = theme === "dark" ? "#FFFFFF" : "#000000";
const bgColor = theme === "dark" ? "#000000" : "#FFFFFF";
Expand All @@ -20,6 +21,8 @@ export default function QRCode({ value, size, className }: Props) {
fgColor={fgColor}
bgColor={bgColor}
level="M"
tabIndex={0}
aria-label={label}
/>
);
}
5 changes: 4 additions & 1 deletion src/app/screens/ReceiveInvoice/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ function ReceiveInvoice() {
return (
<>
<div className="mt-4 relative p-8 bg-white rounded-lg shadow-sm ring-1 ring-black ring-opacity-5 flex justify-center items-center overflow-hidden">
<QRCode value={invoice.paymentRequest.toUpperCase()} />
<QRCode
value={invoice.paymentRequest.toUpperCase()}
label={"QR code with the invoice"}
/>
{paid && (
<div className="absolute inset-0 flex justify-center items-center bg-white/90">
<div className="text-center">
Expand Down

0 comments on commit e61cf7c

Please sign in to comment.