@gluestack-ui/core
Version:
Universal UI components for React Native, Expo, and Next.js
22 lines • 607 B
JavaScript
import { useId } from '@react-aria/utils';
export function useMenuSection(props) {
let { heading, 'aria-label': ariaLabel } = props;
let headingId = useId();
return {
itemProps: {
role: 'presentation',
},
headingProps: heading
? {
'id': headingId,
'aria-hidden': true,
}
: {},
groupProps: {
'role': 'group',
'aria-label': ariaLabel,
'aria-labelledby': heading ? headingId : undefined,
},
};
}
//# sourceMappingURL=useMenuSection.js.map