Skip to content

Instantly share code, notes, and snippets.

@bsturdivan
Created February 15, 2019 20:19
Show Gist options
  • Save bsturdivan/859d15901178b54655731f936f8e8951 to your computer and use it in GitHub Desktop.
Save bsturdivan/859d15901178b54655731f936f8e8951 to your computer and use it in GitHub Desktop.
import PropTypes from 'prop-types'
import React, { Component } from 'react'
import { BuilderBlock } from '@builder.io/react'
import SlickCarousel from 'base/lib/ui/slick_carousel'
@BuilderBlock({
name: 'Slider',
inputs: [
{
name: 'autoplay',
type: 'boolean',
defaultValue: false,
},
],
})
class Slider extends Component {
static propTypes = {
autoplay: PropTypes.bool,
}
render() {
return (
<SlickCarousel options={{ autoplay: this.propTypes.autoplay }}>
<div>
<img src="https://res.cloudinary.com/everlane/image/upload/dpr_1.5,f_auto/v1/i/57b6856b_0cd8.jpg" />
</div>
<div>
<img src="https://res.cloudinary.com/everlane/image/upload/dpr_1.5,f_auto/v1/i/758cd374_968f.jpg" />
</div>
<div>
<img src="https://res.cloudinary.com/everlane/image/upload/dpr_1.5,f_auto/v1/i/7def1320_0749.jpg" />
</div>
</SlickCarousel>
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment