cmspageblocks 1.0.45 → 1.0.48
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.
|
|
3
|
+
"version": "1.0.48",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -34,10 +34,7 @@
|
|
|
34
34
|
"classnames": "^2.3.1",
|
|
35
35
|
"formik": "^2.2.9",
|
|
36
36
|
"react-image-gallery": "^1.2.7",
|
|
37
|
-
"react-
|
|
38
|
-
"react-responsive-carousel": "^3.2.21",
|
|
39
|
-
"react-slick": "^0.28.1",
|
|
40
|
-
"slick-carousel": "^1.8.1"
|
|
37
|
+
"react-responsive-carousel": "^3.2.21"
|
|
41
38
|
},
|
|
42
39
|
"devDependencies": {
|
|
43
40
|
"@babel/core": "^7.15.0",
|
|
@@ -2,6 +2,7 @@ import React, { useState } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Formik } from 'formik';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
+
import { ButtonStyle } from './Styling/ButtonStyle';
|
|
5
6
|
|
|
6
7
|
const Form = ({ options }) => {
|
|
7
8
|
const form = options.content;
|
|
@@ -22,19 +23,24 @@ const Form = ({ options }) => {
|
|
|
22
23
|
}).then((resp) => {
|
|
23
24
|
if (resp.ok === true) {
|
|
24
25
|
alert('Form has been sent!');
|
|
25
|
-
actions.resetForm({ values: {} });
|
|
26
|
+
actions.resetForm({ values: {} });
|
|
26
27
|
} else {
|
|
27
|
-
alert('Please try again later.');
|
|
28
|
+
alert('Please try again later.');
|
|
28
29
|
}
|
|
29
30
|
});
|
|
30
31
|
actions.setSubmitting(false);
|
|
31
32
|
}, 1000);
|
|
32
33
|
}}
|
|
33
|
-
render={({
|
|
34
|
+
render={({
|
|
35
|
+
values,
|
|
36
|
+
errors,
|
|
37
|
+
handleBlur,
|
|
38
|
+
handleChange,
|
|
39
|
+
handleSubmit,
|
|
40
|
+
isSubmitting,
|
|
41
|
+
}) => (
|
|
34
42
|
<FormContainer>
|
|
35
|
-
<form
|
|
36
|
-
onSubmit={handleSubmit}
|
|
37
|
-
>
|
|
43
|
+
<form onSubmit={handleSubmit}>
|
|
38
44
|
{form.options.fields.map((field) => {
|
|
39
45
|
if (field.type === 'select') {
|
|
40
46
|
return (
|
|
@@ -91,9 +97,9 @@ const Form = ({ options }) => {
|
|
|
91
97
|
);
|
|
92
98
|
}
|
|
93
99
|
})}
|
|
94
|
-
<
|
|
100
|
+
<ButtonStyle type="submit" disabled={isSubmitting}>
|
|
95
101
|
Verzenden
|
|
96
|
-
</
|
|
102
|
+
</ButtonStyle>
|
|
97
103
|
</form>
|
|
98
104
|
</FormContainer>
|
|
99
105
|
)}
|
|
@@ -138,13 +144,5 @@ const FormContainer = styled.div`
|
|
|
138
144
|
width: 100%;
|
|
139
145
|
appearance: none;
|
|
140
146
|
border: 1px solid rgba(0, 0, 0, 0.25);
|
|
141
|
-
}
|
|
142
|
-
button {
|
|
143
|
-
border: 0;
|
|
144
|
-
padding: 8px 16px;
|
|
145
|
-
font-size: 1.4rem;
|
|
146
|
-
line-height: 1.4;
|
|
147
|
-
font-weight: bold;
|
|
148
|
-
background: ${(props) => props.theme.primaryColor};
|
|
149
|
-
}
|
|
147
|
+
}
|
|
150
148
|
`;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react'
|
|
2
2
|
import Gallery from 'react-image-gallery';
|
|
3
|
-
// import GridGallery from './GridGallery';
|
|
4
3
|
import { NewGallery } from './ImageSlide.css';
|
|
5
4
|
|
|
6
5
|
export default function ImageGallery({options}) {
|
|
@@ -13,7 +12,6 @@ export default function ImageGallery({options}) {
|
|
|
13
12
|
return (
|
|
14
13
|
<NewGallery>
|
|
15
14
|
<Gallery items={items} showThumbnails={true} thumbnailPosition='right'></Gallery>
|
|
16
|
-
{/* <GridGallery options={options} /> */}
|
|
17
15
|
</NewGallery>
|
|
18
16
|
)
|
|
19
17
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
export const ButtonStyle = styled.button`
|
|
4
|
+
display: block;
|
|
5
|
+
padding: 12px 24px !important;
|
|
6
|
+
border-radius: 12px;
|
|
7
|
+
color: #fff !important;
|
|
8
|
+
color: ${(props) => (props.purple ? '#642C8F' : '#000')};
|
|
9
|
+
border: 2px solid
|
|
10
|
+
${(props) =>
|
|
11
|
+
props.theme.primaryColor ? props.theme.primaryColor : '#642C8F'};
|
|
12
|
+
font-weight: bold;
|
|
13
|
+
text-decoration: none;
|
|
14
|
+
box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.25);
|
|
15
|
+
transition: all 0.5s ease;
|
|
16
|
+
width: fit-content;
|
|
17
|
+
position: relative;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
z-index: 1;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
&:before {
|
|
22
|
+
background-color: ${(props) =>
|
|
23
|
+
props.theme.primaryColor
|
|
24
|
+
? props.theme.primaryColor
|
|
25
|
+
: props.theme.primaryColor} !important;
|
|
26
|
+
width: 100% !important;
|
|
27
|
+
position: absolute;
|
|
28
|
+
right: 0;
|
|
29
|
+
top: 0;
|
|
30
|
+
content: '';
|
|
31
|
+
height: 100% !important;
|
|
32
|
+
z-index: -1;
|
|
33
|
+
transition: all 0.5s ease;
|
|
34
|
+
}
|
|
35
|
+
&:hover {
|
|
36
|
+
border: 2px solid
|
|
37
|
+
${(props) => (props.purple ? '#642C8F' : props.theme.primaryColor)};
|
|
38
|
+
box-shadow: -1px 1px 4px rgba(0, 0, 0, 0.25);
|
|
39
|
+
color: ${(props) => props.theme.primaryColor} !important;
|
|
40
|
+
&:before {
|
|
41
|
+
width: 1px !important;
|
|
42
|
+
right: -1px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import Gallery from 'react-photo-gallery'
|
|
3
|
-
|
|
4
|
-
export default function GridGallery({ options }) {
|
|
5
|
-
|
|
6
|
-
const items = options.content.map(transform)
|
|
7
|
-
|
|
8
|
-
return (
|
|
9
|
-
<div>
|
|
10
|
-
<div style={{ columns: 3 }}>
|
|
11
|
-
{items.map((photo, index) => (
|
|
12
|
-
<img src={photo.original}></img>
|
|
13
|
-
))}
|
|
14
|
-
</div>
|
|
15
|
-
<Gallery photos={items}>
|
|
16
|
-
|
|
17
|
-
</Gallery>
|
|
18
|
-
</div>
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function transform(item) {
|
|
23
|
-
return {
|
|
24
|
-
src: `https://cdn.burobork.nl/${item.reference}`,
|
|
25
|
-
original: `https://cdn.burobork.nl/${item.reference}`,
|
|
26
|
-
thumbnail: `https://cdn.burobork.nl/${item.reference}`,
|
|
27
|
-
originalAlt: item.alt,
|
|
28
|
-
originalTitle: item.title,
|
|
29
|
-
lazyLoad: true,
|
|
30
|
-
height: 3,
|
|
31
|
-
width: 4,
|
|
32
|
-
}
|
|
33
|
-
}
|