Added routes

This commit is contained in:
Jose Selesan
2026-09-25 10:05:56 -03:00
parent 336e1af523
commit 94c353f4f2
100 changed files with 6126 additions and 183 deletions

View File

@@ -0,0 +1,45 @@
import { Check, X } from 'lucide-react'
import { cn } from '../../lib/utils'
import type { AttendanceChoice } from './utils'
export function AttendanceToggle({
choice,
disabled,
onToggle,
fullName,
}: {
choice: AttendanceChoice
disabled?: boolean
onToggle: () => void
fullName: string
}) {
const isPresent = choice === 'PRESENT'
return (
<button
type="button"
role="switch"
aria-checked={isPresent}
aria-label={`${isPresent ? 'Presente' : 'Ausente'}: ${fullName}`}
disabled={disabled}
onClick={onToggle}
className={cn(
'relative inline-flex h-11 w-14 shrink-0 items-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-surface disabled:cursor-not-allowed disabled:opacity-70',
isPresent ? 'bg-success' : 'bg-danger',
)}
>
<span
className={cn(
'inline-flex size-9 items-center justify-center rounded-full bg-white shadow-sm transition-transform duration-150',
isPresent ? 'translate-x-3' : 'translate-x-1',
)}
>
{isPresent ? (
<Check className="size-5 text-success" aria-hidden />
) : (
<X className="size-5 text-danger" aria-hidden />
)}
</span>
</button>
)
}