= React.ComponentClass
;\n\nexport const withEvents =
(Component: ReceivedComponent
) =>\n class WithEvents extends React.Component
{\n static displayName = 'WithEvents';\n listeners: IListeners = {};\n mountPoint: React.Component
| null;\n\n public componentDidMount() {\n const { name: _, config, children, ...restOfProps } = this.props;\n const allProps = { ...config, ...restOfProps };\n const funcs = Object.keys(allProps).filter(\n propName => typeof allProps[propName] === 'function'\n );\n\n const node = ReactDOM.findDOMNode(this.mountPoint);\n\n if (node) {\n funcs.forEach(functionName => {\n this.listeners[functionName] = (event: CustomEvent) => {\n const params = Array.isArray(event.detail) ? event.detail : [];\n allProps[functionName](...params);\n };\n node.addEventListener(functionName, this.listeners[functionName], false);\n });\n }\n }\n\n public componentWillUnmount() {\n const node = ReactDOM.findDOMNode(this.mountPoint);\n\n Object.keys(this.listeners).forEach(functionName => {\n if (node) {\n node.removeEventListener(functionName, this.listeners[functionName]);\n }\n });\n }\n\n public render() {\n return {title}
}\n {teaser && {teaser}}\n >\n );\n});\n\nconst ShowcaseImageItem = observer(function ShowcaseItem({\n item,\n onClick\n}: IShowcaseClickableItem) {\n const { img, url = '' } = item;\n const handleOnClick = () => onClick(item);\n const srcMobile = img.srcMobile ? img.srcMobile : img.src;\n\n return (\n <>\n \n