Skip to content

Commit

Permalink
fix fade effect doc examples css
Browse files Browse the repository at this point in the history
  • Loading branch information
Femi Oladeji committed Aug 20, 2020
1 parent 5bd3a47 commit 0851291
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 22 deletions.
9 changes: 8 additions & 1 deletion docs/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,19 @@ h3 {

.each-fade {
display: flex;
width: 100%;
}

.each-fade img {
.each-fade > div {
width: 75%;
}

.each-fade > div img {
width: 100%;
height: 100%;
object-fit: cover;
}

.each-fade p {
width: 25%;
font-size: 1em;
Expand Down
39 changes: 29 additions & 10 deletions docs/views/codeStrings.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,22 @@ const FadeExample = () => {
<div className="slide-container">
<Fade>
<div className="each-fade">
<img src={fadeImages[0]} />
<h2>First Slide</h2>
<div>
<img src={fadeImages[0]} />
</div>
<p>First Slide</p>
</div>
<div className="each-fade">
<h2>Second Slide</h2>
<img src={fadeImages[1]} />
<p>Second Slide</p>
<div>
<img src={fadeImages[1]} />
</div>
</div>
<div className="each-fade">
<img src={fadeImages[2]} />
<h2>Third Slide</h2>
<div>
<img src={fadeImages[2]} />
</div>
<p>Third Slide</p>
</div>
</Fade>
</div>
Expand All @@ -135,12 +141,19 @@ export default FadeExample;
export const fadeEffectCSS = `
.each-fade {
display: flex;
width: 100%;
}
.each-fade img {
.each-fade > div {
width: 75%;
}
.each-fade > div img {
width: 100%;
height: 100%;
object-fit: cover;
}
.each-fade p {
width: 25%;
font-size: 1em;
Expand Down Expand Up @@ -395,15 +408,21 @@ const PauseHoverExample = () => {
<div className="slide-container">
<Slide {...fadeProperties}>
<div className="each-fade">
<img src={images[0]} />
<div>
<img src={fadeImages[0]} />
</div>
<p>First Slide</p>
</div>
<div className="each-fade">
<p>Second Slide</p>
<img src={images[1]} />
<div>
<img src={fadeImages[1]} />
</div>
</div>
<div className="each-fade">
<img src={images[2]} />
<div>
<img src={fadeImages[2]} />
</div>
<p>Third Slide</p>
</div>
</Slide>
Expand Down
4 changes: 3 additions & 1 deletion docs/views/pages/Examples/CustomIndicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ const CustomIndicatorExample = () => {
<div>
<Zoom {...zoomOutProperties}>
{images.map((each, index) => (
<img key={index} style={{ width: '100%' }} src={each} />
<div key={index} style={{width: "100%"}}>
<img style={{ objectFit: "cover", width: "100%" }} src={each} />
</div>
))}
</Zoom>
</div>
Expand Down
18 changes: 12 additions & 6 deletions docs/views/pages/Examples/Fade.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,22 @@ const FadeExample = () => {
<div>
<Fade {...fadeProperties}>
<div className="each-fade">
<img src={fadeImages[0]} />
<h2>First Slide</h2>
<div>
<img src={fadeImages[0]} />
</div>
<p>First Slide</p>
</div>
<div className="each-fade">
<h2>Second Slide</h2>
<img src={fadeImages[1]} />
<p>Second Slide</p>
<div>
<img src={fadeImages[1]} />
</div>
</div>
<div className="each-fade">
<img src={fadeImages[2]} />
<h2>Third Slide</h2>
<div>
<img src={fadeImages[2]} />
</div>
<p>Third Slide</p>
</div>
</Fade>
</div>
Expand Down
12 changes: 9 additions & 3 deletions docs/views/pages/Examples/PauseHover.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,21 @@ const PauseOnHoverExample = () => {
<div>
<Slide {...fadeProperties}>
<div className="each-fade">
<img src={fadeImages[0]} />
<div>
<img src={fadeImages[0]} />
</div>
<p>First Slide</p>
</div>
<div className="each-fade">
<p>Second Slide</p>
<img src={fadeImages[1]} />
<div>
<img src={fadeImages[1]} />
</div>
</div>
<div className="each-fade">
<img src={fadeImages[2]} />
<div>
<img src={fadeImages[2]} />
</div>
<p>Third Slide</p>
</div>
</Slide>
Expand Down
2 changes: 1 addition & 1 deletion src/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
}

0 comments on commit 0851291

Please sign in to comment.