Repository URL to install this package:
|
Version:
2.1.14 ▾
|
import React from 'react'
import { toUrlWithProtocol } from '@skava/utils'
import { GridTemplateProps } from 'presets/Studio/GridTemplate'
import ImageWithLink from '@skava/ui/dist/components/molecules/ImageWithLink'
function defaultRenderComponent(props: GridTemplateProps) {
const { url, src, alternateText } = props
const imageUrl = toUrlWithProtocol(url)
const imageSrc =
src !== ''
? toUrlWithProtocol(src)
: 'https://reactdemo.skavaone.com/images/null_image.png'
return <ImageWithLink url={imageUrl} src={imageSrc} alt={alternateText} />
}
export { defaultRenderComponent }