Sha256: 2192a12decd19a6b8c102f2333979bc0ba7909811da2306c4fb64d79ae74211d

Contents?: true

Size: 692 Bytes

Versions: 1

Compression:

Stored size: 692 Bytes

Contents

/* @flow */

import React from 'react'
import { noop } from 'lodash'
import classnames from 'classnames'
import Image from '../../pb_image/_image'

type ThumbnailType = {
  active?: boolean,
  alt?: string,
  onClick: () => void,
  url: string,
  width?: string,
}

export default function Thumbnail({
  active = false,
  alt,
  width,
  url,
  onClick = noop,
}: ThumbnailType) {
  const activeClasses = classnames('Thumbnail', { active })
  return (
    <button
        className={classnames(activeClasses)}
        onClick={onClick}
        style={{ width }}
        type="button"
    >
      <Image
          alt={alt}
          size="sm"
          url={url}
      />
    </button>
  )
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
playbook_ui-10.21.0.pre.alpha.lightbox.2 app/pb_kits/playbook/pb_lightbox/Carousel/Thumbnail.jsx