sidebar and starprompt

This commit is contained in:
Alex Holliday committed 2026-02-28 21:48:42 +00:00
1 parent 04c3c57a59
commit 9174e66134
2 files changed
+18 -19

No files matched your search

+10 -12
View File
@@ -1,6 +1,7 @@
import { Typography, IconButton, Stack, Box } from "@mui/material"; import { Typography, IconButton, Stack, Box } from "@mui/material";
import { Icon } from "@/Components/design-elements"; import { Icon } from "@/Components/design-elements";
import { X } from "lucide-react"; import { X } from "lucide-react";
import { SPACING, LAYOUT } from "@/Utils/Theme/constants";
import { useTheme } from "@mui/material"; import { useTheme } from "@mui/material";
import { useSelector, useDispatch } from "react-redux"; import { useSelector, useDispatch } from "react-redux";
@@ -34,25 +35,22 @@ export const StarPrompt = ({
return ( return (
<Stack <Stack
direction="column" direction="column"
sx={{ gap={theme.spacing(LAYOUT.MD)}
width: "100%", padding={theme.spacing(LAYOUT.SM)}
padding: `${theme.spacing(6)} ${theme.spacing(6)}`, width={"100%"}
borderTop: `1px solid ${theme.palette.divider}`, borderTop={`1px solid ${theme.palette.divider}`}
borderBottom: `1px solid ${theme.palette.divider}`, borderBottom={`1px solid ${theme.palette.divider}`}
borderRadius: 0,
gap: theme.spacing(1.5),
}}
> >
<Stack <Stack
direction="row" direction="row"
justifyContent="space-between" justifyContent="space-between"
alignItems="center" alignItems="center"
width="100%" width="100%"
pl={theme.spacing(4)} pl={theme.spacing(LAYOUT.XS)}
> >
<Typography <Typography
variant="subtitle2" variant="subtitle2"
mt={theme.spacing(3)} mt={theme.spacing(SPACING.XXL)}
> >
{t("components.sidebar.starPrompt.title")} {t("components.sidebar.starPrompt.title")}
</Typography> </Typography>
@@ -78,7 +76,7 @@ export const StarPrompt = ({
<Typography <Typography
sx={{ sx={{
mb: 1, mb: 1,
px: theme.spacing(4), px: theme.spacing(LAYOUT.XS),
}} }}
> >
{t("components.sidebar.starPrompt.description")} {t("components.sidebar.starPrompt.description")}
@@ -96,7 +94,7 @@ export const StarPrompt = ({
"&:hover": { "&:hover": {
opacity: 0.8, opacity: 0.8,
}, },
pl: theme.spacing(4), pl: theme.spacing(LAYOUT.XS),
filter: mode === "dark" ? "invert(1)" : "none", filter: mode === "dark" ? "invert(1)" : "none",
}} }}
/> />
+8 -7
View File
@@ -3,6 +3,7 @@ import Backdrop from "@mui/material/Backdrop";
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import List from "@mui/material/List"; import List from "@mui/material/List";
import Divider from "@mui/material/Divider"; import Divider from "@mui/material/Divider";
import { LAYOUT } from "@/Utils/Theme/constants";
import { useSidebar } from "@/Hooks/useSidebar.js"; import { useSidebar } from "@/Hooks/useSidebar.js";
import { Logo } from "@/Components/sidebar/Logo"; import { Logo } from "@/Components/sidebar/Logo";
import { getMenu, getBottomMenu, getAccountMenu } from "@/Components/sidebar/Menu"; import { getMenu, getBottomMenu, getAccountMenu } from "@/Components/sidebar/Menu";
@@ -65,9 +66,9 @@ export const Sidebar = () => {
left={0} left={0}
minHeight={"100vh"} minHeight={"100vh"}
maxHeight={"100vh"} maxHeight={"100vh"}
paddingTop={theme.spacing(6)} paddingTop={theme.spacing(LAYOUT.SM)}
paddingBottom={theme.spacing(6)} paddingBottom={theme.spacing(LAYOUT.SM)}
gap={theme.spacing(6)} gap={theme.spacing(LAYOUT.SM)}
borderRight={`1px solid ${theme.palette.divider}`} borderRight={`1px solid ${theme.palette.divider}`}
width={width} width={width}
sx={{ sx={{
@@ -81,13 +82,13 @@ export const Sidebar = () => {
component="nav" component="nav"
disablePadding disablePadding
sx={{ sx={{
px: theme.spacing(6), px: theme.spacing(LAYOUT.SM),
flex: 1, flex: 1,
}} }}
> >
<Logo <Logo
pt={theme.spacing(8)} pt={theme.spacing(LAYOUT.MD)}
pb={theme.spacing(10)} pb={theme.spacing(LAYOUT.MD)}
/> />
{menu.map((item) => { {menu.map((item) => {
const selected = location.pathname.startsWith(`/${item.path}`); const selected = location.pathname.startsWith(`/${item.path}`);
@@ -105,7 +106,7 @@ export const Sidebar = () => {
<List <List
component="nav" component="nav"
disablePadding disablePadding
sx={{ px: theme.spacing(6) }} sx={{ px: theme.spacing(LAYOUT.SM) }}
> >
{bottomMenu.map((item) => { {bottomMenu.map((item) => {
const selected = location.pathname.startsWith(`/${item.path}`); const selected = location.pathname.startsWith(`/${item.path}`);