import * as React from "react" ; import { merge } from '../../utils' ; interface Props { title ? : string ; width ? : string | number ; height ? : string | number ; background ? : string ; onClick ? : ( event : React . MouseEvent < HTMLButtonElement , MouseEvent > ) => void ; } const Button = ( props ) => { const style = merge ( styles . button , { width : props . width || 24 , height : props . height || props . width , background : props . background || "transparent" } ) ; return ( < button type = "button" style = { style } title = { props . title } onClick = { props . onClick } > { props . children } < /button>); } ; export default Button ; const styles = { button : { width : 24 , height : 24 , border : "none" , padding : "2px" , cursor : "pointer" , margin : "2px 2px" } } ;