Sha256: 7d86bd3ca83edcdf9ae11304a09f8efe66aea52622027344fd30b61f10837d8a
Contents?: true
Size: 758 Bytes
Versions: 372
Compression:
Stored size: 758 Bytes
Contents
import React from 'react' import classnames from 'classnames' import Image from '../../pb_image/_image' type ThumbnailType = { active?: boolean, alt?: string, onClick: () => void, buttonRef?: React.RefObject<HTMLButtonElement>, url: string, width?: string, } export default function Thumbnail({ active = false, alt, width, url, onClick = ()=>{}, buttonRef, }: ThumbnailType): React.ReactElement { const activeClasses = classnames('Thumbnail', { active }) return ( <button className={classnames(activeClasses)} onClick={onClick} ref={buttonRef} style={{ width }} type="button" > <Image alt={alt} size="sm" url={url} /> </button> ) }
Version data entries
372 entries across 372 versions & 1 rubygems