From 7dd685ae49cc7aaf93a4e7f60c0f3c983feea175 Mon Sep 17 00:00:00 2001 From: Vishesh 'ironeagle' Bangotra Date: Tue, 19 May 2026 12:55:41 +0530 Subject: [PATCH] remove unused --- src/shared-theme/ColorModeIconDropdown.tsx | 89 ---------------------- src/shared-theme/ColorModeSelect.tsx | 28 ------- 2 files changed, 117 deletions(-) delete mode 100644 src/shared-theme/ColorModeIconDropdown.tsx delete mode 100644 src/shared-theme/ColorModeSelect.tsx diff --git a/src/shared-theme/ColorModeIconDropdown.tsx b/src/shared-theme/ColorModeIconDropdown.tsx deleted file mode 100644 index 3af1e07..0000000 --- a/src/shared-theme/ColorModeIconDropdown.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import * as React from 'react'; -import DarkModeIcon from '@mui/icons-material/DarkModeRounded'; -import LightModeIcon from '@mui/icons-material/LightModeRounded'; -import Box from '@mui/material/Box'; -import IconButton, { IconButtonOwnProps } from '@mui/material/IconButton'; -import Menu from '@mui/material/Menu'; -import MenuItem from '@mui/material/MenuItem'; -import { useColorScheme } from '@mui/material/styles'; - -export default function ColorModeIconDropdown(props: IconButtonOwnProps) { - const { mode, systemMode, setMode } = useColorScheme(); - const [anchorEl, setAnchorEl] = React.useState(null); - const open = Boolean(anchorEl); - const handleClick = (event: React.MouseEvent) => { - setAnchorEl(event.currentTarget); - }; - const handleClose = () => { - setAnchorEl(null); - }; - const handleMode = (targetMode: 'system' | 'light' | 'dark') => () => { - setMode(targetMode); - handleClose(); - }; - if (!mode) { - return ( - ({ - verticalAlign: 'bottom', - display: 'inline-flex', - width: '2.25rem', - height: '2.25rem', - borderRadius: (theme.vars || theme).shape.borderRadius, - border: '1px solid', - borderColor: (theme.vars || theme).palette.divider, - })} - /> - ); - } - const resolvedMode = (systemMode || mode) as 'light' | 'dark'; - const icon = { - light: , - dark: , - }[resolvedMode]; - return ( - - - {icon} - - - - System - - - Light - - - Dark - - - - ); -} diff --git a/src/shared-theme/ColorModeSelect.tsx b/src/shared-theme/ColorModeSelect.tsx deleted file mode 100644 index 6e71b9b..0000000 --- a/src/shared-theme/ColorModeSelect.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import * as React from 'react'; -import { useColorScheme } from '@mui/material/styles'; -import MenuItem from '@mui/material/MenuItem'; -import Select, { SelectProps } from '@mui/material/Select'; - -export default function ColorModeSelect(props: SelectProps) { - const { mode, setMode } = useColorScheme(); - if (!mode) { - return null; - } - return ( - - ); -}