UNPKG

@swrve/core

Version:

Core set of Swrve UI Components

25 lines (19 loc) 521 B
import React from 'react' import classNames from 'classnames' import { string, oneOfType, object, array } from 'prop-types' const Image = ({ src, alt, className }) => ( <img src={src} alt={alt} className={classNames(className)} draggable="false" /> ) Image.displayName = 'Image' Image.propTypes = { /** Image URL */ src: string, /** Image alt attribute */ alt: string, /** Image extra className */ className: oneOfType([string, object, array]) } Image.defaultProps = { alt: '' } export default Image