diff --git a/src/components/Menu.tsx b/src/components/Menu.tsx new file mode 100644 index 00000000..62ff93f0 --- /dev/null +++ b/src/components/Menu.tsx @@ -0,0 +1,18 @@ +import { Menu as HonorableMenu } from 'honorable' +import type { MenuProps as HonorableMenuProps } from 'honorable' +import { type MutableRefObject, forwardRef } from 'react' + +export type MenuProps = HonorableMenuProps + +function MenuRef({ ...props }: MenuProps, ref: MutableRefObject) { + return ( + + ) +} + +const Menu = forwardRef(MenuRef) + +export default Menu diff --git a/src/components/MenuItem.tsx b/src/components/MenuItem.tsx new file mode 100644 index 00000000..4e80a999 --- /dev/null +++ b/src/components/MenuItem.tsx @@ -0,0 +1,18 @@ +import { MenuItem as HonorableMenuItem } from 'honorable' +import type { MenuItemProps as HonorableMenuItemProps } from 'honorable' +import { type MutableRefObject, forwardRef } from 'react' + +export type MenuItemProps = HonorableMenuItemProps + +function MenuItemRef({ ...props }: MenuItemProps, ref: MutableRefObject) { + return ( + + ) +} + +const MenuItem = forwardRef(MenuItemRef) + +export default MenuItem diff --git a/src/components/SidebarItem.tsx b/src/components/SidebarItem.tsx index af7c2023..201f3c7d 100644 --- a/src/components/SidebarItem.tsx +++ b/src/components/SidebarItem.tsx @@ -87,7 +87,7 @@ const ItemSC = styled.div<{ textDecoration: 'none', whiteSpace: 'nowrap', width: $isHorizontal ? undefined : '100%', - height: $isHorizontal ? undefined : 32, + height: $isHorizontal ? undefined : 39, flexGrow: 0, padding: $isHorizontal ? undefined : theme.spacing.small, borderRadius: '3px', diff --git a/src/components/SidebarSection.tsx b/src/components/SidebarSection.tsx index 7b8cc9b9..59f98a15 100644 --- a/src/components/SidebarSection.tsx +++ b/src/components/SidebarSection.tsx @@ -27,7 +27,7 @@ function SidebarSectionRef( align="center" ref={ref} borderBottom={isHorizontal ? '' : '1px solid border'} - gap={isHorizontal ? 'medium' : 'xsmall'} + gap={isHorizontal ? 'medium' : 'xxsmall'} padding={12} width={isHorizontal ? 'auto' : '100%'} {...styles} diff --git a/src/index.ts b/src/index.ts index ad79887b..afa7d72a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -export { Avatar, Menu, MenuItem } from 'honorable' +export { Avatar } from 'honorable' // Icons export * from './icons' @@ -35,6 +35,8 @@ export { default as IconFrame } from './components/IconFrame' export { default as Input } from './components/Input' export { default as Input2 } from './components/Input2' export { default as Markdown } from './components/Markdown' +export { default as Menu } from './components/Menu' +export { default as MenuItem } from './components/MenuItem' export type { PageCardProps } from './components/PageCard' export { default as PageCard } from './components/PageCard' export { default as PageTitle } from './components/PageTitle'