Add copy to generate address

This commit is contained in:
2026-05-11 02:52:52 +00:00
parent c2334b2cdd
commit ebe1d8acda
3 changed files with 20 additions and 4 deletions

View File

@@ -47,6 +47,8 @@ interface QRCodeProps {
dialogTitle?: string;
/** Whether to display the raw encoded value as copyable text above the QR code. */
showValue?: boolean;
/** Optional subtitle to display below the QR code. */
subtitle?: React.ReactNode;
}
/**
@@ -155,6 +157,7 @@ export function QRCode({
dialog = false,
dialogTitle = 'QR Code',
showValue = false,
subtitle = null,
}: QRCodeProps): React.ReactElement {
const { rows, moduleCount } = useMemo(() => {
const matrix = generateMatrix(value);
@@ -190,6 +193,7 @@ export function QRCode({
return (
<DialogWrapper title={dialogTitle} borderColor={colors.primary} width={dialogWidth}>
{qrContent}
{subtitle}
</DialogWrapper>
);
}