fix: update AbacusQRCode for qrcode.react v4 compatibility
Fix TypeScript errors blocking dev server startup: - Replace missing QRCodeSVGProps import with ComponentProps<typeof QRCodeSVG> - Remove qrStyle prop (not supported in qrcode.react v4.2.0) - QR codes still render correctly with logo and custom colors This fixes dev server compilation errors while maintaining all functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
bd409d4f9a
commit
0f0c3c65e8
|
|
@ -1,5 +1,7 @@
|
|||
import type { ComponentProps } from 'react'
|
||||
import { QRCodeSVG } from 'qrcode.react'
|
||||
import type { QRCodeSVGProps } from 'qrcode.react'
|
||||
|
||||
type QRCodeSVGProps = ComponentProps<typeof QRCodeSVG>
|
||||
|
||||
export interface AbacusQRCodeProps extends Omit<QRCodeSVGProps, 'imageSettings'> {
|
||||
/**
|
||||
|
|
@ -48,7 +50,6 @@ export interface AbacusQRCodeProps extends Omit<QRCodeSVGProps, 'imageSettings'>
|
|||
* <AbacusQRCode
|
||||
* value="https://abaci.one/room/xyz"
|
||||
* size={300}
|
||||
* qrStyle="dots" // Fancy rounded dots
|
||||
* fgColor="#1a1a2e"
|
||||
* level="H" // High error correction for better scanning with logo
|
||||
* />
|
||||
|
|
@ -59,7 +60,6 @@ export function AbacusQRCode({
|
|||
minLogoSize = 150,
|
||||
size = 128,
|
||||
level = 'H', // Default to high error correction for logo
|
||||
qrStyle = 'dots', // Default to fancy rounded dots
|
||||
fgColor = '#111827',
|
||||
bgColor = '#ffffff',
|
||||
...props
|
||||
|
|
@ -75,7 +75,6 @@ export function AbacusQRCode({
|
|||
{...props}
|
||||
size={size}
|
||||
level={level}
|
||||
qrStyle={qrStyle}
|
||||
fgColor={fgColor}
|
||||
bgColor={bgColor}
|
||||
imageSettings={
|
||||
|
|
|
|||
Loading…
Reference in New Issue