mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-14 17:43:04 +00:00
Home ganha a seção Faça parte com os três modelos e a rota /cards concentra catálogo + compositor client-side (dialog desktop, bottom drawer mobile): nome no slot medido do mestre com Brexter 700 e foto full-bleed sob o overlay oficial (pan/zoom clampados), download PNG sem conta e sem enviar nome/foto. Núcleo puro em src/lib/card* com unit tests; e2e cobre home→deep-link, nome→PNG real, erro fail-closed, foto e drawer mobile. Sem migration/PII.
26 lines
669 B
TypeScript
26 lines
669 B
TypeScript
import type { HTMLAttributes, RefObject } from 'react'
|
|
|
|
/**
|
|
* S13 — the canvas element of the card studio. Presentational only: the
|
|
* composer owns the ref, the draw effect and the pointer/keyboard controls.
|
|
*/
|
|
export const CardPreviewCanvas = ({
|
|
model,
|
|
canvasRef,
|
|
className,
|
|
...props
|
|
}: {
|
|
model: { width: number; height: number; label: string }
|
|
canvasRef: RefObject<HTMLCanvasElement | null>
|
|
className?: string
|
|
} & HTMLAttributes<HTMLCanvasElement>) => (
|
|
<canvas
|
|
ref={canvasRef}
|
|
width={model.width}
|
|
height={model.height}
|
|
role="img"
|
|
aria-label={`Prévia do card: ${model.label}`}
|
|
className={className}
|
|
{...props}
|
|
/>
|
|
)
|