mirror of
https://github.com/tale/headplane.git
synced 2026-08-19 09:26:18 +00:00
feat: begin redesign and component unification
This commit is contained in:
+9
-11
@@ -1,4 +1,6 @@
|
||||
import type { Dispatch, ReactNode, SetStateAction } from 'react';
|
||||
import Button from '~/components/Button';
|
||||
import IconButton from '~/components/IconButton';
|
||||
import {
|
||||
Button as AriaButton,
|
||||
Menu as AriaMenu,
|
||||
@@ -8,16 +10,6 @@ import {
|
||||
} from 'react-aria-components';
|
||||
import { cn } from '~/utils/cn';
|
||||
|
||||
function Button(props: Parameters<typeof AriaButton>[0]) {
|
||||
return (
|
||||
<AriaButton
|
||||
{...props}
|
||||
className={cn('outline-none', props.className)}
|
||||
aria-label="Menu"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function Items(props: Parameters<typeof AriaMenu>[0]) {
|
||||
return (
|
||||
<Popover
|
||||
@@ -88,4 +80,10 @@ function Menu({ children }: { children: ReactNode }) {
|
||||
return <MenuTrigger>{children}</MenuTrigger>;
|
||||
}
|
||||
|
||||
export default Object.assign(Menu, { Button, Item, ItemButton, Items });
|
||||
export default Object.assign(Menu, {
|
||||
IconButton,
|
||||
Button,
|
||||
Item,
|
||||
ItemButton,
|
||||
Items
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user