Skip to content

Commit 7060a22

Browse files
committed
Starting restyle of tabs, student goal list
1 parent 533a1a0 commit 7060a22

File tree

4 files changed

+32
-28
lines changed

4 files changed

+32
-28
lines changed
Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useState } from "react";
22
import type { Meta, StoryObj } from "@storybook/react";
33

4-
import { Tab, Tabs } from "@mui/material";
4+
import { Box, Tab, Tabs } from "@mui/material";
55

66
const meta: Meta<typeof Tabs> = {
77
title: "Components/Design System/Tabs",
@@ -16,15 +16,17 @@ export const Primary: Story = {
1616
render: (args) => {
1717
const [value, setValue] = useState<number>(1);
1818
return (
19-
<Tabs
20-
{...args}
21-
value={value}
22-
onChange={(e, newValue) => setValue(newValue as number)}
23-
>
24-
<Tab value={1} label="Item One" />
25-
<Tab value={2} label="Item Two" />
26-
<Tab value={3} label="Item Three" />
27-
</Tabs>
19+
<Box bgcolor="var(--grey-90)" p={2}>
20+
<Tabs
21+
{...args}
22+
value={value}
23+
onChange={(e, newValue) => setValue(newValue as number)}
24+
>
25+
<Tab value={1} label="Item One" />
26+
<Tab value={2} label="Item Two" />
27+
<Tab value={3} label="Item Three" />
28+
</Tabs>
29+
</Box>
2830
);
2931
},
3032
};
@@ -34,13 +36,15 @@ export const Disabled: Story = {
3436
render: (args) => {
3537
const [value, setValue] = useState<number>(1);
3638
return (
37-
<Tabs
38-
{...args}
39-
value={value}
40-
onChange={(e, newValue) => setValue(newValue as number)}
41-
>
42-
<Tab value={1} label="Item One" disabled />
43-
</Tabs>
39+
<Box bgcolor="var(--grey-90)" p={2}>
40+
<Tabs
41+
{...args}
42+
value={value}
43+
onChange={(e, newValue) => setValue(newValue as number)}
44+
>
45+
<Tab value={1} label="Item One" disabled />
46+
</Tabs>
47+
</Box>
4448
);
4549
},
4650
};

src/pages/students/[student_id].tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { trpc } from "@/client/lib/trpc";
1+
import { FormEvent, useEffect, useState } from "react";
22
import {
33
Box,
44
Card,
@@ -10,24 +10,24 @@ import {
1010
} from "@mui/material";
1111
import { addYears, format, parseISO, subDays } from "date-fns";
1212
import { useRouter } from "next/router";
13-
import { useEffect, useState } from "react";
14-
import Iep from "../../components/iep/Iep";
15-
import noGoals from "../../public/img/no-goals-icon.png";
1613
import Image from "next/image";
14+
15+
import noGoals from "../../public/img/no-goals-icon.png";
1716
import $Image from "../../styles/Image.module.css";
1817
import $CompassModal from "../../components/design_system/modal/CompassModal.module.css";
1918
import $StudentPage from "../../styles/StudentPage.module.css";
20-
import { EditStudentModal } from "./EditStudentModal";
21-
import Chip from "@/components/design_system/chip/Chip";
2219

23-
import type { NextPageWithBreadcrumbs } from "@/pages/_app";
20+
import { trpc } from "@/client/lib/trpc";
2421
import type { Breadcrumb } from "@/components/design_system/breadcrumbs/Breadcrumbs";
2522
import { useBreadcrumbsContext } from "@/components/design_system/breadcrumbs/BreadcrumbsContext";
2623
import Button from "@/components/design_system/button/Button";
27-
28-
import * as React from "react";
24+
import Chip from "@/components/design_system/chip/Chip";
25+
import type { NextPageWithBreadcrumbs } from "@/pages/_app";
2926
import type { Student } from "@/types/global";
3027

28+
import { EditStudentModal } from "./EditStudentModal";
29+
import Iep from "./Iep";
30+
3131
const ViewStudentPage: NextPageWithBreadcrumbs = () => {
3232
const { setBreadcrumbs } = useBreadcrumbsContext();
3333
const [open, setOpen] = useState(false);
@@ -90,7 +90,7 @@ const ViewStudentPage: NextPageWithBreadcrumbs = () => {
9090
onSuccess: () => utils.student.getActiveStudentIep.invalidate(),
9191
});
9292

93-
const handleEditStudent = (e: React.FormEvent<HTMLFormElement>) => {
93+
const handleEditStudent = (e: FormEvent<HTMLFormElement>) => {
9494
e.preventDefault();
9595
const data = new FormData(e.currentTarget as HTMLFormElement);
9696

@@ -141,7 +141,7 @@ const ViewStudentPage: NextPageWithBreadcrumbs = () => {
141141
setEndDate(formattedEndDate);
142142
};
143143

144-
const handleIepSubmit = (event: React.FormEvent<HTMLFormElement>) => {
144+
const handleIepSubmit = (event: FormEvent<HTMLFormElement>) => {
145145
event.preventDefault();
146146
const data = new FormData(event.currentTarget);
147147

0 commit comments

Comments
 (0)