Skip to content

Commit 8d90e6f

Browse files
committed
docs: update transition demo to use wall lady images
1 parent 3970816 commit 8d90e6f

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

docs/storybook/content/stories/00-demos/00-index.stories.tsx

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,19 +326,19 @@ export const Transition: StoryFn<ReactCompareSliderProps> = (props) => {
326326
setTimeout(() => {
327327
reactCompareSliderRef.current?.setPosition(90);
328328
resolve(true);
329-
}, 500),
329+
}, 750),
330330
);
331331
await new Promise((resolve) =>
332332
setTimeout(() => {
333333
reactCompareSliderRef.current?.setPosition(10);
334334
resolve(true);
335-
}, 500),
335+
}, 750),
336336
);
337337
await new Promise((resolve) =>
338338
setTimeout(() => {
339339
reactCompareSliderRef.current?.setPosition(50);
340340
resolve(true);
341-
}, 500),
341+
}, 750),
342342
);
343343
};
344344

@@ -351,22 +351,32 @@ export const Transition: StoryFn<ReactCompareSliderProps> = (props) => {
351351
ref={reactCompareSliderRef}
352352
itemOne={
353353
<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"
355355
alt="Image one"
356356
/>
357357
}
358358
itemTwo={
359359
<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"
361361
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+
}}
362372
/>
363373
}
364374
style={{ width: '100%', height: '100vh' }}
365375
/>
366376
);
367377
};
368378

369-
Transition.args = { position: 0, transition: '.5s ease-in-out' };
379+
Transition.args = { position: 50, transition: '.75s ease-in-out' };
370380

371381
export const Position: StoryFn<ReactCompareSliderProps> = ({ position = 25, ...props }) => (
372382
<ReactCompareSlider

0 commit comments

Comments
 (0)