remove deprecated sidebar buttons
This commit is contained in:
parent
f940350695
commit
cba88f20e0
|
@ -1,37 +0,0 @@
|
||||||
import React, { FC } from 'react';
|
|
||||||
import { Button, ButtonProps, Theme, TypographyProps } from '@mui/material';
|
|
||||||
import { FluidContainer } from 'components/Container';
|
|
||||||
import { SystemStyleObject } from '@mui/system';
|
|
||||||
|
|
||||||
export type SidebarButtonProps = ButtonProps<
|
|
||||||
'button',
|
|
||||||
{ typographyVariant?: TypographyProps['variant'] }
|
|
||||||
>;
|
|
||||||
|
|
||||||
const SidebarButton: FC<SidebarButtonProps> = ({
|
|
||||||
children,
|
|
||||||
sx,
|
|
||||||
typographyVariant = 'body',
|
|
||||||
...props
|
|
||||||
}) => {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Button
|
|
||||||
variant="text"
|
|
||||||
size="large"
|
|
||||||
sx={(theme) =>
|
|
||||||
({
|
|
||||||
...theme.typography[typographyVariant],
|
|
||||||
fontWeight: 'bold',
|
|
||||||
px: 1.5,
|
|
||||||
...sx,
|
|
||||||
} as SystemStyleObject<Theme>)
|
|
||||||
}
|
|
||||||
{...props}>
|
|
||||||
<FluidContainer>{children}</FluidContainer>
|
|
||||||
</Button>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default SidebarButton;
|
|
|
@ -1,33 +0,0 @@
|
||||||
import React, { FC } from 'react';
|
|
||||||
import { Box, ButtonProps } from '@mui/material';
|
|
||||||
import SidebarButton from './Button';
|
|
||||||
import { DotSeparator } from './styledComponents';
|
|
||||||
import { formatNumber } from 'utils/number/format';
|
|
||||||
|
|
||||||
type Iprops = ButtonProps<
|
|
||||||
'button',
|
|
||||||
{ label: JSX.Element | string; count: number }
|
|
||||||
>;
|
|
||||||
|
|
||||||
const ShortcutButton: FC<ButtonProps<'button', Iprops>> = ({
|
|
||||||
label,
|
|
||||||
count,
|
|
||||||
...props
|
|
||||||
}) => {
|
|
||||||
return (
|
|
||||||
<SidebarButton
|
|
||||||
variant="contained"
|
|
||||||
color="secondary"
|
|
||||||
sx={{ fontWeight: 'normal' }}
|
|
||||||
{...props}>
|
|
||||||
{label}
|
|
||||||
|
|
||||||
<Box sx={{ color: 'text.muted' }}>
|
|
||||||
<DotSeparator />
|
|
||||||
{formatNumber(count)}
|
|
||||||
</Box>
|
|
||||||
</SidebarButton>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default ShortcutButton;
|
|
|
@ -1,18 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
import { Button, ButtonProps } from '@mui/material';
|
|
||||||
import ChevronRight from '@mui/icons-material/ChevronRight';
|
|
||||||
import { FluidContainer } from 'components/Container';
|
|
||||||
|
|
||||||
type Iprops = ButtonProps<'button'>;
|
|
||||||
|
|
||||||
export function UploadTypeOption({ children, ...props }: Iprops) {
|
|
||||||
return (
|
|
||||||
<Button
|
|
||||||
size="large"
|
|
||||||
color="secondary"
|
|
||||||
endIcon={<ChevronRight />}
|
|
||||||
{...props}>
|
|
||||||
<FluidContainer>{children}</FluidContainer>
|
|
||||||
</Button>
|
|
||||||
);
|
|
||||||
}
|
|
Loading…
Reference in a new issue