@workday/canvas-kit-react
Version:
The parent module that contains all Workday Canvas Kit React components
13 lines (12 loc) • 688 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { createComponent } from './utils/components';
import { handleCsProp } from '@workday/canvas-kit-styling';
/**
* A convenient wrapper for creating an [aria-live region](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions)
*/
export const AriaLiveRegion = createComponent('div')({
displayName: 'AriaLiveRegion',
Component: ({ 'aria-atomic': ariaAtomic = true, 'aria-live': ariaLive = 'polite', role = 'status', ...elemProps }, ref, Element) => {
return (_jsx(Element, { ref: ref, "aria-atomic": ariaAtomic, "aria-live": ariaLive, role: role, ...handleCsProp(elemProps) }));
},
});