From 3c0679253cebab3ef7106a7f0a904593c597c605 Mon Sep 17 00:00:00 2001 From: coderwelsch Date: Mon, 5 Aug 2024 14:28:45 +0200 Subject: [PATCH 1/4] fix: fixed code style for popover menu button --- src/components/popover-menu/popover-menu-button.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/popover-menu/popover-menu-button.tsx b/src/components/popover-menu/popover-menu-button.tsx index c6a2d2dc..54eed1c5 100644 --- a/src/components/popover-menu/popover-menu-button.tsx +++ b/src/components/popover-menu/popover-menu-button.tsx @@ -8,14 +8,18 @@ export interface NavigationPopoverButtonProps extends ButtonProps { onClick?: () => void; } -export const PopoverMenuButton = ({ onClick, ...restProps }: NavigationPopoverButtonProps) => { +export const PopoverMenuButton = ({ + onClick, + children, + ...restProps +}: NavigationPopoverButtonProps) => { const { popoverButton: { setReferenceElement }, } = usePopoverMenuContext(); return ( el && setReferenceElement(el)} onClick={onClick}> - ); }; From 83aac2fce92ea03ae4fcf04256580159e28ece68 Mon Sep 17 00:00:00 2001 From: coderwelsch Date: Mon, 5 Aug 2024 14:30:09 +0200 Subject: [PATCH 2/4] fix: converted to ts --- .../{popover-menu-context.tsx => popover-menu-context.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/components/popover-menu/{popover-menu-context.tsx => popover-menu-context.ts} (100%) diff --git a/src/components/popover-menu/popover-menu-context.tsx b/src/components/popover-menu/popover-menu-context.ts similarity index 100% rename from src/components/popover-menu/popover-menu-context.tsx rename to src/components/popover-menu/popover-menu-context.ts From 70f77ad5bc9f3b56bc2c912767a03f39aa05b054 Mon Sep 17 00:00:00 2001 From: coderwelsch Date: Mon, 5 Aug 2024 14:31:50 +0200 Subject: [PATCH 3/4] renamed NavigationPopoverButtonProps to correct PopoverMenuButtonProps --- src/components/popover-menu/popover-menu-button.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/popover-menu/popover-menu-button.tsx b/src/components/popover-menu/popover-menu-button.tsx index 54eed1c5..7b09d4dc 100644 --- a/src/components/popover-menu/popover-menu-button.tsx +++ b/src/components/popover-menu/popover-menu-button.tsx @@ -3,16 +3,12 @@ import React from "react"; import { usePopoverMenuContext } from "./popover-menu-context"; import { Button, ButtonProps } from "../button/button"; -export interface NavigationPopoverButtonProps extends ButtonProps { +export interface PopoverMenuButtonProps extends ButtonProps { children: React.ReactNode; onClick?: () => void; } -export const PopoverMenuButton = ({ - onClick, - children, - ...restProps -}: NavigationPopoverButtonProps) => { +export const PopoverMenuButton = ({ onClick, children, ...restProps }: PopoverMenuButtonProps) => { const { popoverButton: { setReferenceElement }, } = usePopoverMenuContext(); From 2b800420dcfee387c480cf9c57f62bebbbed0758 Mon Sep 17 00:00:00 2001 From: coderwelsch Date: Mon, 5 Aug 2024 14:36:11 +0200 Subject: [PATCH 4/4] converted to button --- src/components/popover-menu/popover-menu-panel.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/popover-menu/popover-menu-panel.tsx b/src/components/popover-menu/popover-menu-panel.tsx index 69042a7e..305a24ba 100644 --- a/src/components/popover-menu/popover-menu-panel.tsx +++ b/src/components/popover-menu/popover-menu-panel.tsx @@ -9,15 +9,15 @@ export interface PopoverMenuPanelItemProps { const PopoverMenuPanelItem = ({ children, onClick }: PopoverMenuPanelItemProps) => { return ( -
-

{children}

-
+ {children} + ); };