import React from "react";
import Button from "../../Components/Button";
import Link from "../../Components/Link";
import ColoredLabel from "../../Components/Label/ColoredLabel";
import {
useTheme,
Switch,
Checkbox,
FormControl,
FormLabel,
FormControlLabel,
Radio,
RadioGroup,
Tab,
Tabs,
} from "@mui/material";
import StatusLabel from "../../Components/Label/StautsLabel";
import Avatar from "../../Components/Avatar/Avatar";
import avatarImage from "../../assets/Images/avatar_placeholder.png";
import { DataGrid } from "@mui/x-data-grid";
import { DatePicker } from "@mui/x-date-pickers/DatePicker";
import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
const cols = [
{
field: "name",
headerName: "Name",
renderCell: (params) => {
return (
{params.value.firstName} {params.value.lastName}
);
},
flex: 1,
},
{
field: "status",
headerName: "Status",
renderCell: (params) => {
return ;
},
flex: 1,
},
{ field: "role", headerName: "Role", flex: 1 },
{ field: "team", headerName: "Team", flex: 1 },
{ field: "hireDate", headerName: "Hire date", flex: 1 },
];
const rows = ((count) => {
const arr = [];
for (let i = 0; i < count; i++) {
let row = {
id: i,
name: {
avatarImage: i % 2 === 0 ? avatarImage : null,
firstName: "Placeholder Name",
lastName: i.toString(),
},
status: "Active",
role: "Product Designer",
team: "Marketing",
hireDate: new Date().toLocaleDateString(),
};
arr.push(row);
}
return arr;
})(100);
const Demo = () => {
const [radio, setRadio] = React.useState(1);
const [tab, setTab] = React.useState("departments");
const [date, setDate] = React.useState("Pick a date!");
const handleRadio = (event) => {
setRadio(event.target.value);
};
const handleTab = (event, newValue) => {
setTab(newValue);
};
const handleDate = (newValue) => {
setDate(newValue.toString());
};
const change = (event, type) => {
alert(event.target.checked ? `${type} checked` : `${type} unchecked`);
};
const theme = useTheme();
return (
Buttons
Disabled Buttons
Labels
Status Lables
Avatar
Switches
change(event, "Switch")} />
Checkboxes
change(event, "Checkbox")} />
Radio
Demo Radio
} label="1" />
} label="2" />
}
label="3"
/>
}
label="4"
/>
Table
Tabs
{" "}
Date Picker
{date}
);
};
export default Demo;