mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
fixing create item styling escaping
This commit is contained in:
@@ -74,6 +74,7 @@ export function DayTitle({ day, dayAsDate }: { day: string; dayAsDate: Date }) {
|
|||||||
modalControl={modal}
|
modalControl={modal}
|
||||||
buttonText="+"
|
buttonText="+"
|
||||||
buttonClass="unstyled hover:font-bold hover:scale-125 px-1 mb-auto mt-0 pt-0"
|
buttonClass="unstyled hover:font-bold hover:scale-125 px-1 mb-auto mt-0 pt-0"
|
||||||
|
modalWidth="w-135"
|
||||||
>
|
>
|
||||||
{({ closeModal }) => (
|
{({ closeModal }) => (
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -102,7 +102,11 @@ export default function ExpandableModule({
|
|||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<>
|
<>
|
||||||
<Modal modalControl={modal} buttonText="New Item">
|
<Modal
|
||||||
|
modalControl={modal}
|
||||||
|
buttonText="New Item"
|
||||||
|
modalWidth="w-135"
|
||||||
|
>
|
||||||
{({ closeModal }) => (
|
{({ closeModal }) => (
|
||||||
<div>
|
<div>
|
||||||
<NewItemForm
|
<NewItemForm
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ export default function NewItemForm({
|
|||||||
getName={(o) => o?.toString() ?? ""}
|
getName={(o) => o?.toString() ?? ""}
|
||||||
setSelectedOption={(t) => setType(t ?? "Assignment")}
|
setSelectedOption={(t) => setType(t ?? "Assignment")}
|
||||||
selectedOption={type}
|
selectedOption={type}
|
||||||
|
label="Type"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -168,6 +169,7 @@ export default function NewItemForm({
|
|||||||
getName={(g) => g?.name ?? ""}
|
getName={(g) => g?.name ?? ""}
|
||||||
setSelectedOption={setAssignmentGroup}
|
setSelectedOption={setAssignmentGroup}
|
||||||
selectedOption={assignmentGroup}
|
selectedOption={assignmentGroup}
|
||||||
|
label="Assignment Group"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,14 +5,19 @@ export default function ButtonSelect<T>({
|
|||||||
getName,
|
getName,
|
||||||
setSelectedOption,
|
setSelectedOption,
|
||||||
selectedOption,
|
selectedOption,
|
||||||
|
label
|
||||||
}: {
|
}: {
|
||||||
options: T[];
|
options: T[];
|
||||||
getName: (value: T | undefined) => string;
|
getName: (value: T | undefined) => string;
|
||||||
setSelectedOption: (value: T | undefined) => void;
|
setSelectedOption: (value: T | undefined) => void;
|
||||||
selectedOption: T | undefined;
|
selectedOption: T | undefined;
|
||||||
|
label: string;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-row gap-3">
|
<div>
|
||||||
|
<label>{label}</label>
|
||||||
|
<div className="flex flex-row gap-3 flex-wrap">
|
||||||
|
|
||||||
{options.map((o) => (
|
{options.map((o) => (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@@ -26,5 +31,6 @@ export default function ButtonSelect<T>({
|
|||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ export const canvasFileRouter = router({
|
|||||||
|
|
||||||
if (!success) {
|
if (!success) {
|
||||||
console.log("could not download file, returning sourceUrl", sourceUrl);
|
console.log("could not download file, returning sourceUrl", sourceUrl);
|
||||||
|
// make a toast or some other way of notifying the user
|
||||||
return sourceUrl;
|
return sourceUrl;
|
||||||
}
|
}
|
||||||
console.log("local temp file", localFile);
|
console.log("local temp file", localFile);
|
||||||
|
|||||||
Reference in New Issue
Block a user