cmspageblocks 1.0.39 → 1.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cmspageblocks",
3
- "version": "1.0.39",
3
+ "version": "1.0.42",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "repository": {
@@ -35,7 +35,9 @@
35
35
  "formik": "^2.2.9",
36
36
  "react-image-gallery": "^1.2.7",
37
37
  "react-photo-gallery": "^8.0.0",
38
- "react-responsive-carousel": "^3.2.21"
38
+ "react-responsive-carousel": "^3.2.21",
39
+ "react-slick": "^0.28.1",
40
+ "slick-carousel": "^1.8.1"
39
41
  },
40
42
  "devDependencies": {
41
43
  "@babel/core": "^7.15.0",
@@ -1,7 +1,20 @@
1
1
  import React from 'react'
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
- import {Text, Image, ImageSlider, Button, Map, SearchBar, ImageGallery, Portal, Embed, Form, AssortedHouses} from './BlockTypes';
4
+ import {
5
+ Text,
6
+ Image,
7
+ ImageSlider,
8
+ Button,
9
+ Map,
10
+ SearchBar,
11
+ ImageGallery,
12
+ Portal,
13
+ Embed,
14
+ Form,
15
+ AssortedHouses,
16
+ CustomSlider,
17
+ } from './BlockTypes';
5
18
  import { BlockSelf } from '../Main.css'
6
19
 
7
20
  function Block({pageBlock, houses, locale }) {
@@ -15,6 +28,7 @@ function Block({pageBlock, houses, locale }) {
15
28
  case 'assorted_houses': return <Wrapper options={options} key={pageBlock.id}><AssortedHouses options={options} houses={houses} locale={locale} /></Wrapper>
16
29
  case 'bukazu_portal': return <Wrapper options={options} key={pageBlock.id}><Portal options={options} /></Wrapper>
17
30
  case 'button': return <Wrapper options={options} key={pageBlock.id}><Button options={options} /></Wrapper>
31
+ case 'custom_slider': return <Wrapper options={options} key={pageBlock.id}><CustomSlider options={options} /></Wrapper>
18
32
  case 'embed': return <Wrapper options={options} key={pageBlock.id}><Embed options={options} /></Wrapper>
19
33
  case 'form': return <Wrapper options={options} key={pageBlock.id}><Form options={options} /></Wrapper>
20
34
  case 'image': return <Wrapper options={options}><Image options={options} /></Wrapper>
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ import { Carousel } from 'react-responsive-carousel';
3
+ import { SliderContainer } from './ImageGallery/ImageSlide.css';
4
+
5
+ export default function CustomSlider({ options }) {
6
+ const { content } = options;
7
+ return (
8
+ <SliderContainer>
9
+ <Carousel
10
+ showThumbs={false}
11
+ swipeable
12
+ showStatus
13
+ dynamicHeight={false}
14
+ showArrows
15
+ width="100%"
16
+ infiniteLoop
17
+ centerMode
18
+ showIndicators={content.length > 1 ? true : false}
19
+ centerSlidePercentage={70}
20
+ >
21
+ {options.content.map((slide, index) => {
22
+ return (
23
+ <div
24
+ key={index}
25
+ dangerouslySetInnerHTML={{ __html: slide.content }}
26
+ ></div>
27
+ );
28
+ })}
29
+ </Carousel>
30
+ </SliderContainer>
31
+ );
32
+ }
@@ -1,5 +1,6 @@
1
1
  import AssortedHouses from './AssortedHouses'
2
2
  import Button from './Button'
3
+ import CustomSlider from './CustomSlider';
3
4
  import Embed from './Embed'
4
5
  import Form from './Form'
5
6
  import Iframe from './Iframe'
@@ -14,6 +15,7 @@ import Text from './Text'
14
15
  export {
15
16
  AssortedHouses,
16
17
  Button,
18
+ CustomSlider,
17
19
  Embed,
18
20
  Form,
19
21
  Image,