Created
February 15, 2019 20:19
-
-
Save bsturdivan/859d15901178b54655731f936f8e8951 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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