import { CustomRenderElementProps , LogoElement } from '../custom-types' ; import { StyleObject , useStyletron } from 'styletron-react' ; export const Logo = ( { attributes , children , element , } ) => { const [ css ] = useStyletron ( ) ; return ( < span { ... attributes } contentEditable = { false } className = { css ( wrapper ) } > { } < img src = { `/logos/${ element . file }` } className = { css ( imgStyles ) } alt = { element . name } / > { children } < /span>); } ; const wrapper = { display : 'inline-block' , alignItems : 'center' , justifyContent : 'center' , position : 'relative' , } ; const imgStyles = { height : '1em' , display : 'block' , } ;