@@ -6,7 +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 from ' ../doc-components/CustomArrowLeft '
9+ import { CustomArrowLeft , CustomArrowRight } from ' ../doc-components/CustomArrows '
1010import ' ../src/index.scss'
1111
1212<ReactSlidy >
@@ -307,8 +307,8 @@ If you have slides with different heights you need to specify the maxHeight to b
307307
308308<div >
309309 <ReactSlidy imageObjectFit = " contain" >
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" />
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" />
312312 <img style = { {maxHeight: ' 300px' }} src = " https://d.fotocasa.es/promotion/2018/03/26/19414824/2152752.jpg" />
313313 <img style = { {maxHeight: ' 300px' }} src = " https://d.fotocasa.es/promotion/2017/03/23/19298958/1982123.jpg" />
314314 </ReactSlidy >
@@ -317,22 +317,59 @@ If you have slides with different heights you need to specify the maxHeight to b
317317``` js showButton
318318< div>
319319 < ReactSlidy imageObjectFit= " contain" >
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" / >
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" / >
323323 < img style= {{maxHeight: ' 300px' }} src= " https://d.fotocasa.es/promotion/2017/03/23/19298958/1982123.jpg" / >
324324 < / ReactSlidy>
325325< / div>
326326```
327327
328328#### Using custom arrows
329329
330- <ReactSlidy ArrowLeft = { CustomArrowLeft } >
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}>
331367 < img src= " /1.jpg" / >
332368 < img src= " /2.jpg" / >
333369 < img src= " /3.jpg" / >
334370 < img src= " /4.jpg" / >
335371< / ReactSlidy>
372+ ```
336373
337374## API 📖
338375
0 commit comments