{({ open }) => (
- <>
+
+ {direction === MenuDirection.up && items}
-
- {children}
-
- >
+ {direction === MenuDirection.down && items}
+
)}
)
diff --git a/src/components/menu/theme.ts b/src/components/menu/theme.ts
index b5468a30..d9d36c5c 100644
--- a/src/components/menu/theme.ts
+++ b/src/components/menu/theme.ts
@@ -10,6 +10,10 @@ export default {
active: 'bg-primary-100',
},
menuList: {
- base: 'py-2 mb-1 w-32 shadow focus:outline-none bg-white',
+ base: 'py-2 mb-2 w-32 shadow focus:outline-none bg-white absolute',
+ direction: {
+ up: '-mt-2 -translate-y-full',
+ down: '',
+ },
},
}