@styleless-ui/react
Version:
Completely unstyled, headless and accessible React UI components.
32 lines (31 loc) • 966 B
TypeScript
import * as React from "react";
import type { MergeElementProps } from "../../typings";
interface OwnProps {
/**
* The content of the component.
*/
children?: React.ReactNode;
/**
* The className applied to the component.
*/
className?: string;
/**
* The label of the menu.
*/
label: {
/**
* The label to use as `aria-label` property.
*/
screenReaderLabel: string;
} | {
/**
* Identifies the element (or elements) that labels the menu.
*
* @see {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby MDN Web Docs} for more information.
*/
labelledBy: string;
};
}
export type Props = Omit<MergeElementProps<"div", OwnProps>, "defaultValue" | "defaultChecked">;
declare const MenuItems: (props: Props, ref: React.Ref<HTMLDivElement>) => JSX.Element;
export default MenuItems;