@@ -326,19 +326,19 @@ export const Transition: StoryFn<ReactCompareSliderProps> = (props) => {
326
326
setTimeout ( ( ) => {
327
327
reactCompareSliderRef . current ?. setPosition ( 90 ) ;
328
328
resolve ( true ) ;
329
- } , 500 ) ,
329
+ } , 750 ) ,
330
330
) ;
331
331
await new Promise ( ( resolve ) =>
332
332
setTimeout ( ( ) => {
333
333
reactCompareSliderRef . current ?. setPosition ( 10 ) ;
334
334
resolve ( true ) ;
335
- } , 500 ) ,
335
+ } , 750 ) ,
336
336
) ;
337
337
await new Promise ( ( resolve ) =>
338
338
setTimeout ( ( ) => {
339
339
reactCompareSliderRef . current ?. setPosition ( 50 ) ;
340
340
resolve ( true ) ;
341
- } , 500 ) ,
341
+ } , 750 ) ,
342
342
) ;
343
343
} ;
344
344
@@ -351,22 +351,32 @@ export const Transition: StoryFn<ReactCompareSliderProps> = (props) => {
351
351
ref = { reactCompareSliderRef }
352
352
itemOne = {
353
353
< ReactCompareSliderImage
354
- src = "https://raw.githubusercontent.com/nerdyman/stuff/main/libs/react-compare-slider/demo-images/sydney-opera-house-1.jpg "
354
+ src = "https://raw.githubusercontent.com/nerdyman/stuff/main/libs/react-compare-slider/demo-images/lady-1.png "
355
355
alt = "Image one"
356
356
/>
357
357
}
358
358
itemTwo = {
359
359
< ReactCompareSliderImage
360
- src = "https://raw.githubusercontent.com/nerdyman/stuff/main/libs/react-compare-slider/demo-images/sydney-opera-house-2.jpg "
360
+ src = "https://raw.githubusercontent.com/nerdyman/stuff/main/libs/react-compare-slider/demo-images/lady-2.png "
361
361
alt = "Image two"
362
+ style = { {
363
+ backgroundColor : 'white' ,
364
+ backgroundImage : `
365
+ linear-gradient(45deg, #ccc 25%, transparent 25%),
366
+ linear-gradient(-45deg, #ccc 25%, transparent 25%),
367
+ linear-gradient(45deg, transparent 75%, #ccc 75%),
368
+ linear-gradient(-45deg, transparent 75%, #ccc 75%)` ,
369
+ backgroundSize : `20px 20px` ,
370
+ backgroundPosition : `0 0, 0 10px, 10px -10px, -10px 0px` ,
371
+ } }
362
372
/>
363
373
}
364
374
style = { { width : '100%' , height : '100vh' } }
365
375
/>
366
376
) ;
367
377
} ;
368
378
369
- Transition . args = { position : 0 , transition : '.5s ease-in-out' } ;
379
+ Transition . args = { position : 50 , transition : '.75s ease-in-out' } ;
370
380
371
381
export const Position : StoryFn < ReactCompareSliderProps > = ( { position = 25 , ...props } ) => (
372
382
< ReactCompareSlider
0 commit comments