From 48cdef4673eb762773c82a2ed6010eaf14d54f9f Mon Sep 17 00:00:00 2001 From: Wonsuk Choi Date: Wed, 21 Aug 2024 22:03:21 +0900 Subject: [PATCH] =?UTF-8?q?refactor(ui/components):=20createContext=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=EC=82=AC=ED=95=AD=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui/src/components/menu/menu-trigger.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/components/menu/menu-trigger.tsx b/packages/ui/src/components/menu/menu-trigger.tsx index 2e392dc..5b9c6d9 100644 --- a/packages/ui/src/components/menu/menu-trigger.tsx +++ b/packages/ui/src/components/menu/menu-trigger.tsx @@ -2,13 +2,15 @@ import { useMenuContext } from './menu.context'; import { type HTMLFavolinkProps, favolink, forwardRef } from '../../system'; import { composeRefs, cx, mergeFns } from '../../utils'; +const TRIGGER_NAME = 'MenuTrigger'; + export type MenuTriggerProps = HTMLFavolinkProps<'button'>; export const MenuTrigger = forwardRef( function MenuTrigger(props, ref) { const { children, className, onClick, ...restProps } = props; - const context = useMenuContext(); + const context = useMenuContext(TRIGGER_NAME); return ( ( ); }, ); + +MenuTrigger.displayName = TRIGGER_NAME;