Skip to content

Commit

Permalink
build: option tabs (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhrifat committed Aug 17, 2022
1 parent f3f9bb8 commit 8c59784
Showing 1 changed file with 57 additions and 6 deletions.
63 changes: 57 additions & 6 deletions src/components/OptionTabs.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,60 @@
import React from 'react'
import React from "react";
import { Box, Tab, Button, Container } from "@mui/material";
import Tabs, { tabsClasses } from "@mui/material/Tabs";
import { FaFilter } from "react-icons/fa";
import { locationsTab } from "data/mock-data";

const OptionsTab = () => {
const [value, setValue] = React.useState(0);

const handleChange = (event, newValue) => {
setValue(newValue);
};

const OptionTabs = () => {
return (
<div>OptionTabs</div>
)
}
<Container maxWidth="xl">
<Box
sx={{
display: "flex",
flexGrow: 1,
px: { xs: 0, md: 2 },
alignItems: "center",
mt: 2,
mb: 2,
}}
>
<Tabs
value={value}
onChange={handleChange}
variant="scrollable"
scrollButtons
sx={{
[`& .${tabsClasses.scrollButtons}`]: {
"&.Mui-disabled": { opacity: 0.3 },
},
}}
>
{locationsTab.map((tab) => {
return <Tab key={tab.id} icon={tab.icon} label={tab.label} />;
})}
</Tabs>
<Button
sx={{
display: { xs: "none", md: "block" },
border: "1px solid #ddd",
minWidth: 90,
justifyContent: "space-between",
borderRadius: 2,
textTransform: "capitalize",
py: 1,
color: "theme.palette.text.primary",
}}
>
<FaFilter /> Filters
</Button>
</Box>
</Container>
);
};

export default OptionTabs
export default OptionsTab;

0 comments on commit 8c59784

Please sign in to comment.