import React from 'react'; import classNames from 'classnames'; import { Props, SessionIcon } from '../icon'; export class SessionIconButton extends React.PureComponent { public static defaultProps = SessionIcon.defaultProps; constructor(props: any) { super(props); this.clickHandler = this.clickHandler.bind(this); } public render() { const { iconType, iconSize, iconColor, iconRotation, iconPadded, onClick, } = this.props; return (
{ this.clickHandler(e); }} >
); } private clickHandler(e: any) { if (this.props.onClick) { e.stopPropagation(); this.props.onClick(); } } }