feat(homework,classes,course-plans): add scans, student data, take confirm, error boundaries, dialogs, hooks, calendar
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
This commit is contained in:
32
src/modules/classes/components/class-list-toolbar.tsx
Normal file
32
src/modules/classes/components/class-list-toolbar.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
"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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user