-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathslide.js
48 lines (46 loc) · 1.41 KB
/
slide.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import React from 'react';
function Slide({
autoslide = undefined,
autoAnimate = undefined,
backgroundColor = undefined,
backgroundImage = undefined,
backgroundSize = undefined,
backgroundPosition = undefined,
backgroundRepeat = undefined,
backgroundOpacity = undefined,
backgroundVideo = undefined,
backgroundVideoLoop = undefined,
backgroundVideoMuted = undefined,
backgroundIframe = undefined,
backgroundInteractive = undefined,
children,
id = undefined,
transition = undefined,
transitionSpeed = undefined,
uncounted = undefined,
}) {
return (
<section
data-autoslide={autoslide}
id={id}
data-auto-animate={autoAnimate}
data-visibility={uncounted ? 'uncounted' : undefined}
data-background-color={backgroundColor}
data-background-image={backgroundImage}
data-background-size={backgroundSize}
data-background-position={backgroundPosition}
data-background-repeat={backgroundRepeat}
data-background-opacity={backgroundOpacity}
data-background-video={backgroundVideo}
data-background-video-loop={backgroundVideoLoop}
data-background-video-muted={backgroundVideoMuted}
data-background-iframe={backgroundIframe}
data-background-interactive={backgroundInteractive}
data-transition={transition}
data-transition-speed={transitionSpeed}
>
{children}
</section>
);
}
export default Slide;