mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 15:48:32 -06:00
inproper submit...
This commit is contained in:
31
nextjs/src/components/form/DayOfWeekInput.tsx
Normal file
31
nextjs/src/components/form/DayOfWeekInput.tsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import { DayOfWeek } from "@/models/local/localCourse";
|
||||
|
||||
export function DayOfWeekInput({
|
||||
selectedDays,
|
||||
updateSettings,
|
||||
}: {
|
||||
selectedDays: DayOfWeek[];
|
||||
updateSettings: (day: DayOfWeek) => void;
|
||||
}) {
|
||||
return (
|
||||
<div className="flex flex-row gap-3">
|
||||
{Object.values(DayOfWeek).map((day) => {
|
||||
const hasDay = selectedDays.includes(day);
|
||||
return (
|
||||
<button
|
||||
role="button"
|
||||
key={day}
|
||||
className={
|
||||
hasDay
|
||||
? "bg-blue-300 text-blue-950 border-blue-500 border"
|
||||
: "bg-slate-900 border-blue-900 border "
|
||||
}
|
||||
onClick={() => updateSettings(day)}
|
||||
>
|
||||
{day}
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -24,6 +24,7 @@ export default function SelectInput<T>({
|
||||
setValue(option);
|
||||
}}
|
||||
>
|
||||
<option></option>
|
||||
{options.map((o) => (
|
||||
<option key={getOptionName(o)}>{getOptionName(o)}</option>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user