feat: add Menu component

This commit is contained in:
QiShaoXuan
2022-11-03 19:00:17 +08:00
parent 75f05cb399
commit 523f3f273c
6 changed files with 185 additions and 39 deletions
+34
View File
@@ -0,0 +1,34 @@
import { styled } from '@/styles';
import StyledPopperContainer from '../shared/Container';
export const StyledMenuWrapper = styled(StyledPopperContainer)(({ theme }) => {
return {
background: theme.colors.popoverBackground,
padding: '8px 4px',
fontSize: '14px',
backgroundColor: theme.colors.popoverBackground,
boxShadow: theme.shadow.popover,
color: theme.colors.popoverColor,
};
});
export const StyledMenuItem = styled('div')<{ popperVisible?: boolean }>(
({ theme, popperVisible }) => {
return {
borderRadius: '5px',
padding: '0 14px',
color: popperVisible
? theme.colors.primaryColor
: theme.colors.popoverColor,
backgroundColor: popperVisible
? theme.colors.hoverBackground
: 'transparent',
':hover': {
color: theme.colors.primaryColor,
backgroundColor: theme.colors.hoverBackground,
},
};
}
);