Skip to content

Commit

Permalink
fix: 🐛 add proptype validation
Browse files Browse the repository at this point in the history
changed string proptype to boolean

Closes: #2
  • Loading branch information
Rasula Caldera committed Sep 4, 2019
1 parent b8da917 commit 9ff8e0a
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/VideoBg.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,26 @@ const VideoBg = ({
children,
el: El = "div"
}) => (
<El
className={`${classNames.wrapper}${wrapperClass ? " " + wrapperClass : ""}`}
>
<video
className={`${classNames.video}${videoClass ? " " + videoClass : ""}`}
loop={loop}
muted={muted}
poster={poster}
autoPlay={autoPlay}
<El
className={`${classNames.wrapper}${wrapperClass ? " " + wrapperClass : ""}`}
>
{children}
</video>
</El>
);
<video
className={`${classNames.video}${videoClass ? " " + videoClass : ""}`}
loop={loop}
muted={muted}
poster={poster}
autoPlay={autoPlay}
>
{children}
</video>
</El>
);

VideoBg.propTypes = {
wrapperClass: PropTypes.string,
videoClass: PropTypes.string,
loop: PropTypes.string,
muted: PropTypes.string,
muted: PropTypes.bool,
poster: PropTypes.string,
autoPlay: PropTypes.bool,
children: PropTypes.oneOfType([
Expand Down

0 comments on commit 9ff8e0a

Please sign in to comment.