Skip to content

Commit 9834469

Browse files
committed
fix some styles
1 parent b79f58e commit 9834469

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/components/Menu.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@ import React from 'react';
22
import styled from "styled-components";
33
import { Button, ButtonProps, Dialog, DialogTrigger, Popover, PopoverProps } from 'react-aria-components';
44

5-
const StyledButton = styled(Button)`
5+
export const MenuButton = styled(Button)`
6+
border: none;
7+
background: none;
68
`;
79

8-
const StyledPopover = styled(Popover)`
10+
export const MenuPopover = styled(Popover)`
911
padding: 1.6rem;
1012
border-top: 0.4rem solid #63A524;
1113
box-shadow: 0 0.4rem 0.4rem 0 #00000033;
14+
background: #fff;
1215
`;
1316

1417
export interface MenuProps {
@@ -21,15 +24,15 @@ export interface MenuProps {
2124
export const Menu = ({ buttonLabel, buttonIcon, ...props }: React.PropsWithChildren<MenuProps>) => {
2225
return (
2326
<DialogTrigger>
24-
<StyledButton aria-label={buttonLabel} {...props.buttonProps}>
27+
<MenuButton aria-label={buttonLabel} {...props.buttonProps}>
2528
{typeof buttonIcon === 'string' ?
2629
<img aria-hidden='true' src={buttonIcon} alt='' /> : buttonIcon}
27-
</StyledButton>
28-
<StyledPopover {...props.popoverProps}>
30+
</MenuButton>
31+
<MenuPopover {...props.popoverProps}>
2932
<Dialog>
3033
{props.children}
3134
</Dialog>
32-
</StyledPopover>
35+
</MenuPopover>
3336
</DialogTrigger>
3437
);
3538
};

0 commit comments

Comments
 (0)