Skip to content

Commit

Permalink
statically done with sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
Yashkapure06 committed Aug 28, 2022
1 parent 8293635 commit 7c80cbf
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions src/components/Sidebar.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import React from "react";
import { Stack } from "@mui/material";

import { categories } from "../utils/constants";

const selectedCategory = "New";

const Sidebar = () => (
<Stack
direction="row"
sx={{
overflowY: "auto",
height: { sx: "auto", md: "95%" },
flexDirection: { md: "column" },
}}
>
{categories.map((category) => (
<button
className="category-btn"
style={{
background: category.name === selectedCategory && "#FC1503",
color: "white",
}}
>
<span
style={{
color: category.name === selectedCategory ? " white" : "red",
marginRight: "15px",
}}
>
{category.icon}
</span>
<span
style={{
opacity: category.name === selectedCategory ? "1" : "0.8",
}}
>{category.name}</span>
</button>
))}
</Stack>
);

export default Sidebar;

0 comments on commit 7c80cbf

Please sign in to comment.