1.0.6 • Published 3 years ago

thinktodo-polaroid v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

thinktodo-polaroid

A polaroid component from ThinkToDo

NPM JavaScript Style Guide

Install

npm install --save thinktodo-polaroid

Usage

import React from 'react'
import PolaroidCard from 'thinktodo-polaroid'
import 'bootstrap/dist/css/bootstrap.min.css'

const App = () => {
  return (
    <PolaroidCard
      containerClass='bg-white p-2 overflow-hidden'
      rotate={'8'}
      zoom={'1.1'}
      width='200px'
      height='fit-content'
      imgSrc='https://ik.imagekit.io/gsozk5bngn/12_uHbxld-PZ.jpg'
      imgWidth='100%'
      imgHeight={null}
      imgClass='img-thumbnail border-0'
      onClick={() => {}}
      body={<q>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</q>}
    />
  )
}

export default App

Component Props

PropsDefaultTypeDescriptionExample
containerClass''stringClass for card elementbg-white
rotate''stringRotation of card8
zoom''stringZoom aspect when hover on card1.2
width''stringWidth of card200px
height''stringHeight of cardfit-content
imgClass''stringClass for image element
imageContainerClass''stringClass for image containerimg-thumbnail
imgSrc''stringImage urlhttps://ik.imagekit.io/gsozk5bngn/12_uHbxld-PZ.jpg
imgWidth'100%'stringWidth of image120px
imgHeightnullstringHeight of image120px
onClick()=>{}functionEvent triggers when click on card()=>{ console.log("item selected") }
body<div></div>nodeBody component of card body<p>Lorem ipsum dolor sit ametelit.</p>

Demo

vino map gif vino map gif

License

MIT © thinktodo-dev

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago