Use flex instead of grid for context menu item
This commit is contained in:
parent
9dcc42ff28
commit
17d5ef1f6b
1 changed files with 8 additions and 21 deletions
|
@ -1,5 +1,5 @@
|
|||
import { forwardRef, ReactNode, Ref } from 'react';
|
||||
import { Grid, Group, UnstyledButton, UnstyledButtonProps } from '@mantine/core';
|
||||
import { Box, Group, UnstyledButton, UnstyledButtonProps } from '@mantine/core';
|
||||
import { motion, Variants } from 'framer-motion';
|
||||
import styled from 'styled-components';
|
||||
|
||||
|
@ -75,26 +75,13 @@ export const ContextMenuButton = forwardRef(
|
|||
disabled={props.disabled}
|
||||
onClick={props.onClick}
|
||||
>
|
||||
<Grid>
|
||||
<Grid.Col
|
||||
span={2}
|
||||
sx={{ alignSelf: 'center' }}
|
||||
>
|
||||
{leftIcon}
|
||||
</Grid.Col>
|
||||
<Grid.Col span={8}>{children} </Grid.Col>
|
||||
<Grid.Col
|
||||
span={2}
|
||||
sx={{ alignSelf: 'center' }}
|
||||
>
|
||||
<Group
|
||||
align="flex-end"
|
||||
position="right"
|
||||
>
|
||||
{rightIcon}
|
||||
</Group>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
<Group position="apart">
|
||||
<Group spacing="md">
|
||||
<Box>{leftIcon}</Box>
|
||||
<Box mr="2rem">{children}</Box>
|
||||
</Group>
|
||||
<Box>{rightIcon}</Box>
|
||||
</Group>
|
||||
</StyledContextMenuButton>
|
||||
);
|
||||
},
|
||||
|
|
Reference in a new issue