From 15d1486f987de4adb846ea149844abee12e1b623 Mon Sep 17 00:00:00 2001 From: midudev Date: Mon, 27 Jan 2020 10:20:15 +0100 Subject: [PATCH] Add new demo for different height slides --- pages/index.mdx | 26 +++++++++++++++++++++++++- src/index.scss | 2 +- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/pages/index.mdx b/pages/index.mdx index 9e80efe..f892748 100644 --- a/pages/index.mdx +++ b/pages/index.mdx @@ -293,13 +293,37 @@ By default, slides uses the full width of the container. So, if you're using an ```js showButton - + ``` +#### Adapt slides to use the height available + +If you have slides with different heights you need to specify the maxHeight to be used for each slide, in order to avoid inner images or content to make the slider jump as they will automatically adapt to the available width and automatically detect the height. + +
+ + + + + + +
+ +```js showButton +
+ + + + + + +
+``` + ## API 📖 diff --git a/src/index.scss b/src/index.scss index 5e0501c..d2a0779 100644 --- a/src/index.scss +++ b/src/index.scss @@ -118,7 +118,7 @@ $react-slidy-mh: 50px !default; display: inline-block; position: relative; user-select: none; - vertical-align: top; + vertical-align: middle; width: 100%; } }