@styleless-ui/react
Version:
Completely unstyled, headless and accessible React UI components.
29 lines (28 loc) • 968 B
TypeScript
import * as React from "react";
import type { Classes, MergeElementProps } from "../../typings";
interface OwnProps {
/**
* The content of the component.
*/
children?: React.ReactNode;
/**
* Map of sub-components and their correlated classNames.
*/
classes?: Classes<"root" | "label">;
label: string | {
/**
* The label to use as `aria-label` property.
*/
screenReaderLabel: string;
} | {
/**
* Identifies the element (or elements) that labels the group.
*
* @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>, "className" | "defaultChecked">;
declare const MenuGroup: (props: Props, ref: React.Ref<HTMLDivElement>) => JSX.Element;
export default MenuGroup;