import React from 'react'; import { Box, BoxProps, Menu, MenuProps, Switch, Typography, } from '@mui/material'; import { styled } from '@mui/system'; interface ButtonBoxProps extends BoxProps {} export const ButtonBox = ({ children, ...props }: ButtonBoxProps) => { return ( {children} ); }; export const Card = styled(Box)(({ theme }) => ({ borderRadius: '8px', background: theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.2)' : 'rgb(244, 246, 248)', cursor: 'pointer', // padding: '8px', })); export const OneLineTypography = styled(Typography)` text-overflow: ellipsis; overflow: hidden; white-space: nowrap; `; export const Separator = styled(Box)(({ theme }) => ({ height: '1px', width: '100%', background: theme.palette.mode === 'dark' ? '#1e2325' : '#f0f0f0', })); export const StyledMenu = styled((props: MenuProps) => ( ))(({ theme }) => ({ '& .MuiPaper-root': { borderRadius: 6, marginTop: theme.spacing(1), minWidth: 180, color: theme.palette.mode === 'light' ? 'rgb(55, 65, 81)' : theme.palette.grey[300], // boxShadow: // 'rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px', boxShadow: 'rgb(145 158 171 / 24%) 0px 0px 2px 0px, rgb(145 158 171 / 24%) -20px 20px 40px -4px', '& .MuiMenu-list': { padding: '0px 8px', }, '& .MuiMenuItem-root': { padding: '12px 24px', borderRadius: '8px', '& .MuiSvgIcon-root': { fontSize: 18, color: theme.palette.text.secondary, marginRight: theme.spacing(1.5), }, '&:active': { // backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity), }, }, }, })); export const ThemeSwitch = styled(Switch)(({ theme }) => ({ width: 62, height: 34, padding: 7, '& .MuiSwitch-switchBase': { margin: 1, padding: 0, transform: 'translateX(6px)', '&.Mui-checked': { color: '#fff', transform: 'translateX(22px)', '& .MuiSwitch-thumb:before': { backgroundImage: `url('data:image/svg+xml;utf8,')`, }, '& + .MuiSwitch-track': { opacity: 1, backgroundColor: theme.palette.mode === 'dark' ? '#8796A5' : '#aab4be', }, }, }, '& .MuiSwitch-thumb': { backgroundColor: theme.palette.mode === 'dark' ? '#003892' : '#001e3c', width: 32, height: 32, '&:before': { content: "''", position: 'absolute', width: '100%', height: '100%', left: 0, top: 0, backgroundRepeat: 'no-repeat', backgroundPosition: 'center', backgroundImage: `url('data:image/svg+xml;utf8,')`, }, }, '& .MuiSwitch-track': { opacity: 1, backgroundColor: theme.palette.mode === 'dark' ? '#8796A5' : '#aab4be', borderRadius: 20 / 2, }, })); export const Input = styled('input')({ display: 'none', }); export const BlurBG = ({ img }: { img: string | undefined }) => { return ( ); }; export const BGShadow = styled(Box)` position: absolute; width: 100%; height: 100px; background: linear-gradient(180deg, #1a1c1f 0%, rgba(15, 17, 20, 0) 100%); transform: matrix(1, 0, 0, -1, 0, 0); left: 0; bottom: 0; `; export const UploadInput = styled('input')({ display: 'none', }); export const SquareBox = styled(Box)` position: relative; aspect-ratio: 1 / 1; `;