import * as React from "react"; export interface IButtonProps { buttonType?: string; className?: string; id?: string; text: string; title: string; type?: string; disabled?: boolean; onClick?: any; iconLeft?: JSX.Element; iconRight?: JSX.Element; hideText?: boolean; } class Button extends React.Component { constructor(props: any) { super(props); } public render() { let className: string = "button"; if (this.props.className) { className += " " + this.props.className; } const iconLeft: JSX.Element | null = this.props.iconLeft ? ( {this.props.iconLeft} ) : null; const iconRight: JSX.Element | null = this.props.iconRight ? ( {this.props.iconRight} ) : null; let text: JSX.Element | null = ( {this.props.text} ); if (this.props.hideText) { text = null; } return ( ); } } export default Button;