@@ -6,6 +6,7 @@ import Api from '../doc-components/Api'
66import DynamicContent from ' ../doc-components/DynamicContent'
77import Dots from ' ../doc-components/Dots'
88import Number from ' ../doc-components/Number'
9+ import {CustomArrowLeft , CustomArrowRight } from ' ../doc-components/CustomArrows'
910import ' ../src/index.scss'
1011
1112<ReactSlidy >
@@ -53,7 +54,7 @@ you could also load the CSS directly from HTML:
5354```
5455
5556## Customization 👩🎨
56- If you're using SASS, you could modify the next variables:
57+ If you're using SASS, you could modify the following variables:
5758
5859``` sass
5960$react-slidy-c-background: transparent !default;
@@ -306,8 +307,8 @@ If you have slides with different heights you need to specify the maxHeight to b
306307
307308<div >
308309 <ReactSlidy imageObjectFit = " contain" >
309- <img style = { {maxHeight: ' 300px' }} src = " https://d.fotocasa.es/promotion/2017/03/23/19298958/1873819.jpg" />
310- <img style = { {maxHeight: ' 300px' }} src = " https://d.fotocasa.es/promotion/2018/02/12/19402331/2108283.jpg" />
310+ <img style = { {maxHeight: ' 300px' }} src = " https://d.fotocasa.es/promotion/2017/03/23/19298958/1873819.jpg" />
311+ <img style = { {maxHeight: ' 300px' }} src = " https://d.fotocasa.es/promotion/2018/02/12/19402331/2108283.jpg" />
311312 <img style = { {maxHeight: ' 300px' }} src = " https://d.fotocasa.es/promotion/2018/03/26/19414824/2152752.jpg" />
312313 <img style = { {maxHeight: ' 300px' }} src = " https://d.fotocasa.es/promotion/2017/03/23/19298958/1982123.jpg" />
313314 </ReactSlidy >
@@ -316,14 +317,60 @@ If you have slides with different heights you need to specify the maxHeight to b
316317``` js showButton
317318< div>
318319 < ReactSlidy imageObjectFit= " contain" >
319- < img style= {{maxHeight: ' 300px' }}src= " https://d.fotocasa.es/promotion/2017/03/23/19298958/1873819.jpg" / >
320- < img style= {{maxHeight: ' 300px' }}src= " https://d.fotocasa.es/promotion/2018/02/12/19402331/2108283.jpg" / >
321- < img style= {{maxHeight: ' 300px' }}src= " https://d.fotocasa.es/promotion/2018/03/26/19414824/2152752.jpg" / >
320+ < img style= {{maxHeight: ' 300px' }} src= " https://d.fotocasa.es/promotion/2017/03/23/19298958/1873819.jpg" / >
321+ < img style= {{maxHeight: ' 300px' }} src= " https://d.fotocasa.es/promotion/2018/02/12/19402331/2108283.jpg" / >
322+ < img style= {{maxHeight: ' 300px' }} src= " https://d.fotocasa.es/promotion/2018/03/26/19414824/2152752.jpg" / >
322323 < img style= {{maxHeight: ' 300px' }} src= " https://d.fotocasa.es/promotion/2017/03/23/19298958/1982123.jpg" / >
323324 < / ReactSlidy>
324325< / div>
325326```
326327
328+ #### Using custom arrows
329+
330+ <ReactSlidy ArrowLeft = { CustomArrowLeft } ArrowRight = { CustomArrowRight } >
331+ <img src = " /1.jpg" />
332+ <img src = " /2.jpg" />
333+ <img src = " /3.jpg" />
334+ <img src = " /4.jpg" />
335+ </ReactSlidy >
336+
337+ ``` js showButton
338+ const buttonStyle = {
339+ background: ' transparent' ,
340+ border: 0 ,
341+ cursor: ' pointer' ,
342+ fontSize: 72 ,
343+ height: ' 30%' ,
344+ margin: ' auto 10px' ,
345+ padding: 15
346+ }
347+
348+ function CustomArrow ({emoji, ... props}) {
349+ return (
350+ < button {... props} style= {buttonStyle}>
351+ < span role= " img" aria- label= " Arrow" >
352+ {emoji}
353+ < / span>
354+ < / button>
355+ )
356+ }
357+
358+ function CustomArrowLeft (props ) {
359+ return < CustomArrow {... props} emoji= " 👈" / >
360+ }
361+
362+ function CustomArrowRight (props ) {
363+ return < CustomArrow {... props} emoji= " 👉" / >
364+ }
365+
366+ < ReactSlidy ArrowLeft= {CustomArrowLeft} ArrowRight= {CustomArrowRight}>
367+ < img src= " /1.jpg" / >
368+ < img src= " /2.jpg" / >
369+ < img src= " /3.jpg" / >
370+ < img src= " /4.jpg" / >
371+ < / ReactSlidy>
372+ ```
373+
327374## API 📖
328375
329376<Api />
0 commit comments