import * as React from 'react' ; import { ISize } from '../../interfaces/ISize' ; interface Props { size : ISize ; image : string ; imageAlt : string ; href : string ; style ? : React . CSSProperties ; } export const ImageButton = ( props ) => { let imagePadding = 10 ; let buttonStyle = { ... props . style , width : props . size . width , height : props . size . height } ; let imageStyle = { maxWidth : props . size . width - imagePadding , maxHeight : props . size . height - imagePadding } ; return ( < div className = "ImageButton" style = { buttonStyle } > < a href = { props . href } style = { imageStyle } > < img alt = { props . imageAlt } src = { props . image } style = { imageStyle } / > < /a> < /div>); } ;