Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
content={({ hideFlyout }) => (
)}
>
renderChildren(onMouseEnter, onMouseLeave) {
const { children } = this.props;
const { handleChildClick } = this;
if (typeof children === "function") {
return children({ handleClick: handleChildClick });
}
if (React.Children.count(children) === 1) {
return React.cloneElement(children, {
onClick: combineEventHandlers(handleChildClick, children.props.onClick),
onMouseEnter,
onMouseLeave
});
}
return children;
}
getRemoveButtonProps = ({ onClick, item, ...props } = {}) => {
/**
* @param {MouseEvent} event
*/
const handleRemoveButtonClick = event => {
event.stopPropagation();
this.unselectItem(item);
};
const handleClick = combineEventHandlers(onClick, handleRemoveButtonClick);
return {
...props,
onClick: handleClick
};
};
{({ handleClick }) => (
)}
content={({ hideFlyout }) => (
)}
>
{({ handleClick }) => (
)}
return function renderNotification(notification) {
const {
content,
featured,
id,
image,
key,
onDismiss,
showDismissButton,
timestamp,
type,
unread
} = notification;
const handleDismiss = combineEventHandlers(onDismiss, () =>
dismissNotification(id)
);
return (
{content}
{({ handleClick }) => (
)}
{({ handleClick }) => (
<button>
</button>
)}