@workday/canvas-kit-react
Version:
The parent module that contains all Workday Canvas Kit React components
14 lines (11 loc) • 354 B
text/typescript
import {createElemPropsHook} from '@workday/canvas-kit-react/common';
import {usePopupModel} from './usePopupModel';
/**
* Adds the necessary props to a {@link PopupCard Popup.Card} subcomponent.
*/
export const usePopupCard = createElemPropsHook(usePopupModel)(({state}) => {
return {
role: 'dialog',
'aria-labelledby': state.id,
};
});