@workday/canvas-kit-react
Version:
The parent module that contains all Workday Canvas Kit React components
13 lines (12 loc) • 459 B
JavaScript
import { createElemPropsHook } from '@workday/canvas-kit-react/common';
import { usePopupModel } from './usePopupModel';
/**
* Adds the necessary props to a close button component. Used by the
* {@link PopupCloseButton Popup.CloseButton} subcomponent and
* {@link PopupCloseIcon Popup.CloseIcon} subcomponent.
*/
export const usePopupCloseButton = createElemPropsHook(usePopupModel)(({ events }) => {
return {
onClick: events.hide,
};
});