Files
Momento/memento-note/components/note-select-checkbox.tsx
Antigravity a7b16870a4
All checks were successful
CI / Lint, Unit Tests & Build (push) Successful in 7m17s
CI / Deploy production (on server) (push) Successful in 24s
fix(ui): sélection groupée dans la boîte de réception
Permet de cocher plusieurs notes, les déplacer vers un carnet ou les envoyer à la corbeille, et rend la carte mentale plus lisible.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-01 19:40:10 +00:00

40 lines
893 B
TypeScript

'use client'
import { Check } from 'lucide-react'
import { cn } from '@/lib/utils'
export function NoteSelectCheckbox({
checked,
onToggle,
label,
className,
}: {
checked: boolean
onToggle: () => void
label: string
className?: string
}) {
return (
<button
type="button"
role="checkbox"
aria-checked={checked}
aria-label={label}
onPointerDown={(e) => e.stopPropagation()}
onClick={(e) => {
e.stopPropagation()
onToggle()
}}
className={cn(
'shrink-0 w-5 h-5 rounded border flex items-center justify-center transition-colors',
checked
? 'bg-brand-accent border-brand-accent text-white'
: 'border-foreground/25 bg-background/90 hover:border-brand-accent/60',
className,
)}
>
{checked ? <Check size={12} strokeWidth={3} /> : null}
</button>
)
}