homework: - Add data-access-scans, data-access-student, data-access-utils, data-access-exam-cross - Add excellent-submissions, homework-take-confirm-dialog, homework-take-sidebar components classes: - Add class-delete-dialog, class-error-boundary, class-form-dialog, class-form-utils - Add class-list-table, class-list-toolbar, class-skeleton - Add schedule-create-dialog, schedule-delete-dialog, schedule-edit-dialog, schedule-utils - Add data-access-teacher and hooks directory course-plans: - Add course-plan-calendar, sortable-week-row, template-picker-dialog components - Add lib directory
33 lines
737 B
TypeScript
33 lines
737 B
TypeScript
"use client"
|
|
|
|
import { Plus } from "lucide-react"
|
|
import { useTranslations } from "next-intl"
|
|
|
|
import { Badge } from "@/shared/components/ui/badge"
|
|
import { Button } from "@/shared/components/ui/button"
|
|
|
|
export function ClassListToolbar({
|
|
count,
|
|
onNew,
|
|
isWorking,
|
|
disabled = false,
|
|
}: {
|
|
count: number
|
|
onNew: () => void
|
|
isWorking: boolean
|
|
disabled?: boolean
|
|
}) {
|
|
const t = useTranslations("classes")
|
|
return (
|
|
<div className="flex items-center justify-between">
|
|
<Badge variant="secondary" className="tabular-nums">
|
|
{count}
|
|
</Badge>
|
|
<Button onClick={onNew} disabled={isWorking || disabled}>
|
|
<Plus className="mr-2 h-4 w-4" />
|
|
{t("list.new")}
|
|
</Button>
|
|
</div>
|
|
)
|
|
}
|