Sha256: b44a681c1583063fae3af577626336bda82e17805c6e0c2665b7538264829851
Contents?: true
Size: 905 Bytes
Versions: 7
Compression:
Stored size: 905 Bytes
Contents
/* @flow */ import React from 'react' import classnames from 'classnames' import { globalProps } from '../utilities/globalProps.js' import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props' type ImageProps = { alt?: String, aria?: object, className?: String, data?: object, id?: String, url: String, } const Image = (props: ImageProps) => { const { alt = '', aria = {}, className, data = {}, id, url = '', } = props const ariaProps = buildAriaProps(aria) const classes = classnames(buildCss('pb_image lazyload blur_up'), className, globalProps(props)) const dataProps = buildDataProps(data) return ( <div> <img {...ariaProps} {...dataProps} alt={alt} className={classes} data-src={url} id={id} src={url} /> </div> ) } export default Image
Version data entries
7 entries across 7 versions & 1 rubygems