import React from 'react'; import classNames from 'classnames'; export enum SessionIconButtonTypes { 'exit' = 'exit', 'search' = 'search', 'back' = 'back', 'attachment' = 'attachment', 'emoji' = 'emoji', 'favorite' = 'favorite', 'group' = 'group', 'menu' = 'menu', 'message' = 'message', 'microphone' = 'microphone', 'network' = 'network', 'options' = 'options', 'theme' = 'theme', } export enum SessionIconButtonSizes { 'small' = 'small', 'medium' = 'medium', 'large' = 'large', } interface Props { iconType: SessionIconButtonTypes; iconSize: SessionIconButtonSizes; onClick: any; } export class SessionIconButton extends React.PureComponent { constructor(props: any) { super(props); this.clickHandler = this.clickHandler.bind(this); } public render() { const { iconType, iconSize } = this.props; const iconPath = `./images/session/icon-${iconType}.svg`; return (
{ this.clickHandler(e); }} > Icon Button
); } private clickHandler(e: any) { if (this.props.onClick) { e.stopPropagation(); this.props.onClick(); } } }