Added tabs
This commit is contained in:
1 parent
13a458cf43
commit
efc97d4a6e
1 file changed
+15
-1
@@ -11,6 +11,8 @@ import {
|
|||||||
FormControlLabel,
|
FormControlLabel,
|
||||||
Radio,
|
Radio,
|
||||||
RadioGroup,
|
RadioGroup,
|
||||||
|
Tab,
|
||||||
|
Tabs,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import StatusLabel from "../../Components/Label/StautsLabel";
|
import StatusLabel from "../../Components/Label/StautsLabel";
|
||||||
import Avatar from "../../Components/Avatar/Avatar";
|
import Avatar from "../../Components/Avatar/Avatar";
|
||||||
@@ -72,11 +74,16 @@ const rows = ((count) => {
|
|||||||
|
|
||||||
const Demo = () => {
|
const Demo = () => {
|
||||||
const [radio, setRadio] = React.useState(1);
|
const [radio, setRadio] = React.useState(1);
|
||||||
|
const [tab, setTab] = React.useState("departments");
|
||||||
|
|
||||||
const handleRadio = (event) => {
|
const handleRadio = (event) => {
|
||||||
setRadio(event.target.value);
|
setRadio(event.target.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleTab = (event, newValue) => {
|
||||||
|
setTab(newValue);
|
||||||
|
};
|
||||||
|
|
||||||
const change = (event, type) => {
|
const change = (event, type) => {
|
||||||
alert(event.target.checked ? `${type} checked` : `${type} unchecked`);
|
alert(event.target.checked ? `${type} checked` : `${type} unchecked`);
|
||||||
};
|
};
|
||||||
@@ -164,7 +171,7 @@ const Demo = () => {
|
|||||||
</FormControl>
|
</FormControl>
|
||||||
</div>
|
</div>
|
||||||
<h4>Table</h4>
|
<h4>Table</h4>
|
||||||
<div style={{ height: "400px", width: "50vw" }}>
|
<div style={{ width: "50vw" }}>
|
||||||
<DataGrid
|
<DataGrid
|
||||||
autoHeight
|
autoHeight
|
||||||
columns={cols}
|
columns={cols}
|
||||||
@@ -176,6 +183,13 @@ const Demo = () => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<h4>Tabs</h4>
|
||||||
|
<Tabs value={tab} onChange={handleTab}>
|
||||||
|
<Tab label="My details" value="details" />
|
||||||
|
<Tab label="My team" value="team" />
|
||||||
|
<Tab label="Departments" value="departments" />
|
||||||
|
<Tab label="Approvals" value="approvals" />
|
||||||
|
</Tabs>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user