@react-beauty/ui-sidebar
Version:
ui-sidebar
16 lines (15 loc) • 579 B
TypeScript
import { ButtonHTMLAttributes, AnchorHTMLAttributes, ReactNode } from 'react';
type CommonProps = {
icon?: ReactNode;
active?: boolean;
children: ReactNode;
};
type ButtonProps = CommonProps & ButtonHTMLAttributes<HTMLButtonElement> & {
href?: never;
};
type AnchorProps = CommonProps & AnchorHTMLAttributes<HTMLAnchorElement> & {
href: string;
};
export type SidebarItemProps = ButtonProps | AnchorProps;
export declare const SidebarItem: import('react').ForwardRefExoticComponent<SidebarItemProps & import('react').RefAttributes<HTMLLIElement>>;
export {};