Skip to content

Commit

Permalink
refactor(ui/components): createContext 변경사항 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
sukvvon committed Aug 21, 2024
1 parent 08c8cb6 commit 48cdef4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/ui/src/components/menu/menu-trigger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<MenuTriggerProps, 'button'>(
function MenuTrigger(props, ref) {
const { children, className, onClick, ...restProps } = props;

const context = useMenuContext();
const context = useMenuContext(TRIGGER_NAME);

return (
<favolink.button
Expand All @@ -24,3 +26,5 @@ export const MenuTrigger = forwardRef<MenuTriggerProps, 'button'>(
);
},
);

MenuTrigger.displayName = TRIGGER_NAME;

0 comments on commit 48cdef4

Please sign in to comment.