@qite/tide-booking-component 1.4.61 → 1.4.62
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/build/build-cjs/index.js +85 -0
- package/build/build-cjs/src/content/components/image-with-text.d.ts +2 -1
- package/build/build-cjs/src/content/image-with-text-section/card.d.ts +4 -0
- package/build/build-cjs/src/content/image-with-text-section/index.d.ts +4 -0
- package/build/build-cjs/src/content/image-with-text-section/types.d.ts +19 -0
- package/build/build-cjs/src/index.d.ts +3 -1
- package/build/build-esm/index.js +85 -1
- package/build/build-esm/src/content/components/image-with-text.d.ts +2 -1
- package/build/build-esm/src/content/image-with-text-section/card.d.ts +4 -0
- package/build/build-esm/src/content/image-with-text-section/index.d.ts +4 -0
- package/build/build-esm/src/content/image-with-text-section/types.d.ts +19 -0
- package/build/build-esm/src/index.d.ts +3 -1
- package/package.json +1 -1
- package/src/content/components/image-with-text.tsx +8 -6
- package/src/content/image-with-text-section/card.tsx +58 -0
- package/src/content/image-with-text-section/index.tsx +22 -0
- package/src/content/image-with-text-section/types.ts +20 -0
- package/src/index.ts +3 -1
- package/styles/components/_image-with-text.scss +31 -34
package/build/build-cjs/index.js
CHANGED
|
@@ -44909,6 +44909,90 @@ var Login = function (_a) {
|
|
|
44909
44909
|
);
|
|
44910
44910
|
};
|
|
44911
44911
|
|
|
44912
|
+
var ImageWithTextCard = function (_a) {
|
|
44913
|
+
var noCard = _a.noCard,
|
|
44914
|
+
fullImage = _a.fullImage,
|
|
44915
|
+
reverse = _a.reverse,
|
|
44916
|
+
imageSrc = _a.imageSrc,
|
|
44917
|
+
imageAlt = _a.imageAlt,
|
|
44918
|
+
title = _a.title,
|
|
44919
|
+
activityTitle = _a.activityTitle,
|
|
44920
|
+
activityText = _a.activityText,
|
|
44921
|
+
detailsTitle = _a.detailsTitle,
|
|
44922
|
+
detailsText = _a.detailsText,
|
|
44923
|
+
buttonText = _a.buttonText,
|
|
44924
|
+
onButtonClick = _a.onButtonClick;
|
|
44925
|
+
var cardClassName = 'image-with-text__card';
|
|
44926
|
+
if (noCard) {
|
|
44927
|
+
cardClassName += ' image-with-text__card--no-card';
|
|
44928
|
+
}
|
|
44929
|
+
if (fullImage) {
|
|
44930
|
+
cardClassName += ' image-with-text__card--full-image';
|
|
44931
|
+
}
|
|
44932
|
+
if (reverse) {
|
|
44933
|
+
cardClassName += ' image-with-text__card--reverse';
|
|
44934
|
+
}
|
|
44935
|
+
return React__default['default'].createElement(
|
|
44936
|
+
'div',
|
|
44937
|
+
{ className: cardClassName },
|
|
44938
|
+
React__default['default'].createElement(
|
|
44939
|
+
'div',
|
|
44940
|
+
{ className: 'image-with-text__card__image__wrapper' },
|
|
44941
|
+
React__default['default'].createElement('img', { src: imageSrc, alt: imageAlt, className: 'image-with-text__card__image' })
|
|
44942
|
+
),
|
|
44943
|
+
React__default['default'].createElement(
|
|
44944
|
+
'div',
|
|
44945
|
+
{ className: 'image-with-text__card__content' },
|
|
44946
|
+
React__default['default'].createElement('h3', { className: 'image-with-text__card__title' }, title),
|
|
44947
|
+
React__default['default'].createElement(
|
|
44948
|
+
'div',
|
|
44949
|
+
{ className: 'image-with-text__card__description' },
|
|
44950
|
+
React__default['default'].createElement('h5', { className: 'image-with-text__card__description__title' }, activityTitle),
|
|
44951
|
+
React__default['default'].createElement('p', { className: 'image-with-text__card__description__text' }, activityText)
|
|
44952
|
+
),
|
|
44953
|
+
React__default['default'].createElement(
|
|
44954
|
+
'div',
|
|
44955
|
+
{ className: 'image-with-text__card__description' },
|
|
44956
|
+
React__default['default'].createElement('h5', { className: 'image-with-text__card__description__title' }, detailsTitle),
|
|
44957
|
+
React__default['default'].createElement('p', { className: 'image-with-text__card__description__text' }, detailsText)
|
|
44958
|
+
),
|
|
44959
|
+
React__default['default'].createElement(
|
|
44960
|
+
'div',
|
|
44961
|
+
{ className: 'image-with-text__card__btn' },
|
|
44962
|
+
React__default['default'].createElement('button', { type: 'button', className: 'cta cta--select', onClick: onButtonClick }, buttonText)
|
|
44963
|
+
)
|
|
44964
|
+
)
|
|
44965
|
+
);
|
|
44966
|
+
};
|
|
44967
|
+
|
|
44968
|
+
var ImageWithTextSection = function (_a) {
|
|
44969
|
+
var title = _a.title,
|
|
44970
|
+
hasBackground = _a.hasBackground,
|
|
44971
|
+
cards = _a.cards;
|
|
44972
|
+
var className = 'image-with-text '.concat(hasBackground ? 'image-with-text--background' : '');
|
|
44973
|
+
return React__default['default'].createElement(
|
|
44974
|
+
'div',
|
|
44975
|
+
{ className: className },
|
|
44976
|
+
React__default['default'].createElement(
|
|
44977
|
+
'div',
|
|
44978
|
+
{ className: 'image-with-text__container' },
|
|
44979
|
+
React__default['default'].createElement(
|
|
44980
|
+
'div',
|
|
44981
|
+
{ className: 'image-with-text__title__row' },
|
|
44982
|
+
React__default['default'].createElement('h2', { className: 'image-with-text__title' }, title)
|
|
44983
|
+
),
|
|
44984
|
+
React__default['default'].createElement(
|
|
44985
|
+
'div',
|
|
44986
|
+
{ className: 'image-with-text__card__wrapper' },
|
|
44987
|
+
!lodash.isEmpty(cards) &&
|
|
44988
|
+
cards.map(function (card, index) {
|
|
44989
|
+
return React__default['default'].createElement(ImageWithTextCard, __assign({ key: index }, card));
|
|
44990
|
+
})
|
|
44991
|
+
)
|
|
44992
|
+
)
|
|
44993
|
+
);
|
|
44994
|
+
};
|
|
44995
|
+
|
|
44912
44996
|
var signalR$1 = {};
|
|
44913
44997
|
|
|
44914
44998
|
var jqueryDeferred$1 = { exports: {} };
|
|
@@ -48808,6 +48892,7 @@ exports.BookingWizard = BookingWizard;
|
|
|
48808
48892
|
exports.Footer = Footer;
|
|
48809
48893
|
exports.Header = Header;
|
|
48810
48894
|
exports.ImageCardGrid = ImageCardGrid;
|
|
48895
|
+
exports.ImageWithTextSection = ImageWithTextSection;
|
|
48811
48896
|
exports.Login = Login;
|
|
48812
48897
|
exports.Navbar = Navbar;
|
|
48813
48898
|
exports.QSM = QSM;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
type Variant = 'image-with-
|
|
2
|
+
type Variant = 'image-with-text__card--no-card' | 'image-with-text__card--full-img';
|
|
3
3
|
interface ImageWithTextCardProps {
|
|
4
|
+
variant?: Variant;
|
|
4
5
|
reverse?: boolean;
|
|
5
6
|
imageSrc: string;
|
|
6
7
|
imageAlt: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface ImageWithTextSectionProps {
|
|
2
|
+
title: string;
|
|
3
|
+
hasBackground?: boolean;
|
|
4
|
+
cards: ImageWithTextCardProps[];
|
|
5
|
+
}
|
|
6
|
+
export interface ImageWithTextCardProps {
|
|
7
|
+
noCard?: boolean;
|
|
8
|
+
fullImage?: boolean;
|
|
9
|
+
reverse?: boolean;
|
|
10
|
+
imageSrc: string;
|
|
11
|
+
imageAlt: string;
|
|
12
|
+
title: string;
|
|
13
|
+
activityTitle: string;
|
|
14
|
+
activityText: string;
|
|
15
|
+
detailsTitle: string;
|
|
16
|
+
detailsText: string;
|
|
17
|
+
buttonText: string;
|
|
18
|
+
onButtonClick?: () => void;
|
|
19
|
+
}
|
|
@@ -7,12 +7,14 @@ import QSM from './qsm';
|
|
|
7
7
|
import SearchResults from './search-results';
|
|
8
8
|
import ImageCardGrid from './content/image-card-grid';
|
|
9
9
|
import Login from './content/login';
|
|
10
|
+
import ImageWithTextSection from './content/image-with-text-section';
|
|
10
11
|
export * from './content/navbar/types';
|
|
11
12
|
export * from './content/header/types';
|
|
12
13
|
export * from './content/footer/types';
|
|
13
14
|
export * from './content/image-card-grid/types';
|
|
14
15
|
export * from './content/login/types';
|
|
16
|
+
export * from './content/image-with-text-section/types';
|
|
15
17
|
export * from './search-results/types';
|
|
16
18
|
export * from './qsm/types';
|
|
17
19
|
export * from './shared/types';
|
|
18
|
-
export { BookingProduct, BookingWizard, QSM, SearchResults, Navbar, Header, Footer, ImageCardGrid, Login };
|
|
20
|
+
export { BookingProduct, BookingWizard, QSM, SearchResults, Navbar, Header, Footer, ImageCardGrid, Login, ImageWithTextSection };
|
package/build/build-esm/index.js
CHANGED
|
@@ -44617,6 +44617,90 @@ var Login = function (_a) {
|
|
|
44617
44617
|
);
|
|
44618
44618
|
};
|
|
44619
44619
|
|
|
44620
|
+
var ImageWithTextCard = function (_a) {
|
|
44621
|
+
var noCard = _a.noCard,
|
|
44622
|
+
fullImage = _a.fullImage,
|
|
44623
|
+
reverse = _a.reverse,
|
|
44624
|
+
imageSrc = _a.imageSrc,
|
|
44625
|
+
imageAlt = _a.imageAlt,
|
|
44626
|
+
title = _a.title,
|
|
44627
|
+
activityTitle = _a.activityTitle,
|
|
44628
|
+
activityText = _a.activityText,
|
|
44629
|
+
detailsTitle = _a.detailsTitle,
|
|
44630
|
+
detailsText = _a.detailsText,
|
|
44631
|
+
buttonText = _a.buttonText,
|
|
44632
|
+
onButtonClick = _a.onButtonClick;
|
|
44633
|
+
var cardClassName = 'image-with-text__card';
|
|
44634
|
+
if (noCard) {
|
|
44635
|
+
cardClassName += ' image-with-text__card--no-card';
|
|
44636
|
+
}
|
|
44637
|
+
if (fullImage) {
|
|
44638
|
+
cardClassName += ' image-with-text__card--full-image';
|
|
44639
|
+
}
|
|
44640
|
+
if (reverse) {
|
|
44641
|
+
cardClassName += ' image-with-text__card--reverse';
|
|
44642
|
+
}
|
|
44643
|
+
return React__default.createElement(
|
|
44644
|
+
'div',
|
|
44645
|
+
{ className: cardClassName },
|
|
44646
|
+
React__default.createElement(
|
|
44647
|
+
'div',
|
|
44648
|
+
{ className: 'image-with-text__card__image__wrapper' },
|
|
44649
|
+
React__default.createElement('img', { src: imageSrc, alt: imageAlt, className: 'image-with-text__card__image' })
|
|
44650
|
+
),
|
|
44651
|
+
React__default.createElement(
|
|
44652
|
+
'div',
|
|
44653
|
+
{ className: 'image-with-text__card__content' },
|
|
44654
|
+
React__default.createElement('h3', { className: 'image-with-text__card__title' }, title),
|
|
44655
|
+
React__default.createElement(
|
|
44656
|
+
'div',
|
|
44657
|
+
{ className: 'image-with-text__card__description' },
|
|
44658
|
+
React__default.createElement('h5', { className: 'image-with-text__card__description__title' }, activityTitle),
|
|
44659
|
+
React__default.createElement('p', { className: 'image-with-text__card__description__text' }, activityText)
|
|
44660
|
+
),
|
|
44661
|
+
React__default.createElement(
|
|
44662
|
+
'div',
|
|
44663
|
+
{ className: 'image-with-text__card__description' },
|
|
44664
|
+
React__default.createElement('h5', { className: 'image-with-text__card__description__title' }, detailsTitle),
|
|
44665
|
+
React__default.createElement('p', { className: 'image-with-text__card__description__text' }, detailsText)
|
|
44666
|
+
),
|
|
44667
|
+
React__default.createElement(
|
|
44668
|
+
'div',
|
|
44669
|
+
{ className: 'image-with-text__card__btn' },
|
|
44670
|
+
React__default.createElement('button', { type: 'button', className: 'cta cta--select', onClick: onButtonClick }, buttonText)
|
|
44671
|
+
)
|
|
44672
|
+
)
|
|
44673
|
+
);
|
|
44674
|
+
};
|
|
44675
|
+
|
|
44676
|
+
var ImageWithTextSection = function (_a) {
|
|
44677
|
+
var title = _a.title,
|
|
44678
|
+
hasBackground = _a.hasBackground,
|
|
44679
|
+
cards = _a.cards;
|
|
44680
|
+
var className = 'image-with-text '.concat(hasBackground ? 'image-with-text--background' : '');
|
|
44681
|
+
return React__default.createElement(
|
|
44682
|
+
'div',
|
|
44683
|
+
{ className: className },
|
|
44684
|
+
React__default.createElement(
|
|
44685
|
+
'div',
|
|
44686
|
+
{ className: 'image-with-text__container' },
|
|
44687
|
+
React__default.createElement(
|
|
44688
|
+
'div',
|
|
44689
|
+
{ className: 'image-with-text__title__row' },
|
|
44690
|
+
React__default.createElement('h2', { className: 'image-with-text__title' }, title)
|
|
44691
|
+
),
|
|
44692
|
+
React__default.createElement(
|
|
44693
|
+
'div',
|
|
44694
|
+
{ className: 'image-with-text__card__wrapper' },
|
|
44695
|
+
!isEmpty(cards) &&
|
|
44696
|
+
cards.map(function (card, index) {
|
|
44697
|
+
return React__default.createElement(ImageWithTextCard, __assign({ key: index }, card));
|
|
44698
|
+
})
|
|
44699
|
+
)
|
|
44700
|
+
)
|
|
44701
|
+
);
|
|
44702
|
+
};
|
|
44703
|
+
|
|
44620
44704
|
var signalR$1 = {};
|
|
44621
44705
|
|
|
44622
44706
|
var jqueryDeferred$1 = { exports: {} };
|
|
@@ -48511,4 +48595,4 @@ var signalR = /*#__PURE__*/ _mergeNamespaces(
|
|
|
48511
48595
|
[signalR$1]
|
|
48512
48596
|
);
|
|
48513
48597
|
|
|
48514
|
-
export { BookingProduct, BookingWizard, DepartureRange, Footer, Header, ImageCardGrid, Login, Navbar, QSM, SearchResults };
|
|
48598
|
+
export { BookingProduct, BookingWizard, DepartureRange, Footer, Header, ImageCardGrid, ImageWithTextSection, Login, Navbar, QSM, SearchResults };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
type Variant = 'image-with-
|
|
2
|
+
type Variant = 'image-with-text__card--no-card' | 'image-with-text__card--full-img';
|
|
3
3
|
interface ImageWithTextCardProps {
|
|
4
|
+
variant?: Variant;
|
|
4
5
|
reverse?: boolean;
|
|
5
6
|
imageSrc: string;
|
|
6
7
|
imageAlt: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface ImageWithTextSectionProps {
|
|
2
|
+
title: string;
|
|
3
|
+
hasBackground?: boolean;
|
|
4
|
+
cards: ImageWithTextCardProps[];
|
|
5
|
+
}
|
|
6
|
+
export interface ImageWithTextCardProps {
|
|
7
|
+
noCard?: boolean;
|
|
8
|
+
fullImage?: boolean;
|
|
9
|
+
reverse?: boolean;
|
|
10
|
+
imageSrc: string;
|
|
11
|
+
imageAlt: string;
|
|
12
|
+
title: string;
|
|
13
|
+
activityTitle: string;
|
|
14
|
+
activityText: string;
|
|
15
|
+
detailsTitle: string;
|
|
16
|
+
detailsText: string;
|
|
17
|
+
buttonText: string;
|
|
18
|
+
onButtonClick?: () => void;
|
|
19
|
+
}
|
|
@@ -7,12 +7,14 @@ import QSM from './qsm';
|
|
|
7
7
|
import SearchResults from './search-results';
|
|
8
8
|
import ImageCardGrid from './content/image-card-grid';
|
|
9
9
|
import Login from './content/login';
|
|
10
|
+
import ImageWithTextSection from './content/image-with-text-section';
|
|
10
11
|
export * from './content/navbar/types';
|
|
11
12
|
export * from './content/header/types';
|
|
12
13
|
export * from './content/footer/types';
|
|
13
14
|
export * from './content/image-card-grid/types';
|
|
14
15
|
export * from './content/login/types';
|
|
16
|
+
export * from './content/image-with-text-section/types';
|
|
15
17
|
export * from './search-results/types';
|
|
16
18
|
export * from './qsm/types';
|
|
17
19
|
export * from './shared/types';
|
|
18
|
-
export { BookingProduct, BookingWizard, QSM, SearchResults, Navbar, Header, Footer, ImageCardGrid, Login };
|
|
20
|
+
export { BookingProduct, BookingWizard, QSM, SearchResults, Navbar, Header, Footer, ImageCardGrid, Login, ImageWithTextSection };
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
type Variant = 'image-with-
|
|
3
|
+
type Variant = 'image-with-text__card--no-card' | 'image-with-text__card--full-img';
|
|
4
4
|
|
|
5
5
|
interface ImageWithTextCardProps {
|
|
6
|
+
variant?: Variant;
|
|
6
7
|
reverse?: boolean;
|
|
7
8
|
imageSrc: string;
|
|
8
9
|
imageAlt: string;
|
|
@@ -16,6 +17,7 @@ interface ImageWithTextCardProps {
|
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
const ImageWithTextCard: React.FC<ImageWithTextCardProps> = ({
|
|
20
|
+
variant,
|
|
19
21
|
reverse,
|
|
20
22
|
imageSrc,
|
|
21
23
|
imageAlt,
|
|
@@ -27,7 +29,7 @@ const ImageWithTextCard: React.FC<ImageWithTextCardProps> = ({
|
|
|
27
29
|
buttonText,
|
|
28
30
|
onButtonClick
|
|
29
31
|
}) => (
|
|
30
|
-
<div className={`image-with-text__card ${reverse ? 'image-with-text__card--reverse' : ''}`}>
|
|
32
|
+
<div className={`image-with-text__card ${reverse ? 'image-with-text__card--reverse' : ''} ${variant ? variant.toString() : ''}`}>
|
|
31
33
|
<div className="image-with-text__card__image__wrapper">
|
|
32
34
|
<img src={imageSrc} alt={imageAlt} className="image-with-text__card__image" />
|
|
33
35
|
</div>
|
|
@@ -62,8 +64,8 @@ interface ImageWithTextSectionProps {
|
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
export const ImageWithTextSection: React.FC<ImageWithTextSectionProps> = ({ variant, sectionTitle, hasBackground = true, cards }) => {
|
|
65
|
-
const className =
|
|
66
|
-
|
|
67
|
+
const className = ['image-with-text', hasBackground && 'image-with-text--background'].filter(Boolean).join(' ');
|
|
68
|
+
console.log('variant', variant);
|
|
67
69
|
return (
|
|
68
70
|
<div className={className}>
|
|
69
71
|
<div className="image-with-text__container">
|
|
@@ -72,8 +74,8 @@ export const ImageWithTextSection: React.FC<ImageWithTextSectionProps> = ({ vari
|
|
|
72
74
|
</div>
|
|
73
75
|
|
|
74
76
|
<div className="image-with-text__card__wrapper">
|
|
75
|
-
<ImageWithTextCard {...cards[0]} />
|
|
76
|
-
<ImageWithTextCard {...cards[1]} reverse />
|
|
77
|
+
<ImageWithTextCard {...cards[0]} variant={variant} />
|
|
78
|
+
<ImageWithTextCard {...cards[1]} reverse variant={variant} />
|
|
77
79
|
</div>
|
|
78
80
|
</div>
|
|
79
81
|
</div>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ImageWithTextCardProps } from './types';
|
|
3
|
+
|
|
4
|
+
const ImageWithTextCard: React.FC<ImageWithTextCardProps> = ({
|
|
5
|
+
noCard,
|
|
6
|
+
fullImage,
|
|
7
|
+
reverse,
|
|
8
|
+
imageSrc,
|
|
9
|
+
imageAlt,
|
|
10
|
+
title,
|
|
11
|
+
activityTitle,
|
|
12
|
+
activityText,
|
|
13
|
+
detailsTitle,
|
|
14
|
+
detailsText,
|
|
15
|
+
buttonText,
|
|
16
|
+
onButtonClick
|
|
17
|
+
}) => {
|
|
18
|
+
let cardClassName = 'image-with-text__card';
|
|
19
|
+
if (noCard) {
|
|
20
|
+
cardClassName += ' image-with-text__card--no-card';
|
|
21
|
+
}
|
|
22
|
+
if (fullImage) {
|
|
23
|
+
cardClassName += ' image-with-text__card--full-image';
|
|
24
|
+
}
|
|
25
|
+
if (reverse) {
|
|
26
|
+
cardClassName += ' image-with-text__card--reverse';
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<div className={cardClassName}>
|
|
31
|
+
<div className="image-with-text__card__image__wrapper">
|
|
32
|
+
<img src={imageSrc} alt={imageAlt} className="image-with-text__card__image" />
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div className="image-with-text__card__content">
|
|
36
|
+
<h3 className="image-with-text__card__title">{title}</h3>
|
|
37
|
+
|
|
38
|
+
<div className="image-with-text__card__description">
|
|
39
|
+
<h5 className="image-with-text__card__description__title">{activityTitle}</h5>
|
|
40
|
+
<p className="image-with-text__card__description__text">{activityText}</p>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div className="image-with-text__card__description">
|
|
44
|
+
<h5 className="image-with-text__card__description__title">{detailsTitle}</h5>
|
|
45
|
+
<p className="image-with-text__card__description__text">{detailsText}</p>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<div className="image-with-text__card__btn">
|
|
49
|
+
<button type="button" className="cta cta--select" onClick={onButtonClick}>
|
|
50
|
+
{buttonText}
|
|
51
|
+
</button>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export default ImageWithTextCard;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ImageWithTextSectionProps } from './types';
|
|
3
|
+
import ImageWithTextCard from './card';
|
|
4
|
+
import { isEmpty } from 'lodash';
|
|
5
|
+
|
|
6
|
+
const ImageWithTextSection: React.FC<ImageWithTextSectionProps> = ({ title, hasBackground, cards }) => {
|
|
7
|
+
const className = `image-with-text ${hasBackground ? 'image-with-text--background' : ''}`;
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<div className={className}>
|
|
11
|
+
<div className="image-with-text__container">
|
|
12
|
+
<div className="image-with-text__title__row">
|
|
13
|
+
<h2 className="image-with-text__title">{title}</h2>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<div className="image-with-text__card__wrapper">{!isEmpty(cards) && cards.map((card, index) => <ImageWithTextCard key={index} {...card} />)}</div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default ImageWithTextSection;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface ImageWithTextSectionProps {
|
|
2
|
+
title: string;
|
|
3
|
+
hasBackground?: boolean;
|
|
4
|
+
cards: ImageWithTextCardProps[];
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface ImageWithTextCardProps {
|
|
8
|
+
noCard?: boolean;
|
|
9
|
+
fullImage?: boolean;
|
|
10
|
+
reverse?: boolean;
|
|
11
|
+
imageSrc: string;
|
|
12
|
+
imageAlt: string;
|
|
13
|
+
title: string;
|
|
14
|
+
activityTitle: string;
|
|
15
|
+
activityText: string;
|
|
16
|
+
detailsTitle: string;
|
|
17
|
+
detailsText: string;
|
|
18
|
+
buttonText: string;
|
|
19
|
+
onButtonClick?: () => void;
|
|
20
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -7,14 +7,16 @@ import QSM from './qsm';
|
|
|
7
7
|
import SearchResults from './search-results';
|
|
8
8
|
import ImageCardGrid from './content/image-card-grid';
|
|
9
9
|
import Login from './content/login';
|
|
10
|
+
import ImageWithTextSection from './content/image-with-text-section';
|
|
10
11
|
|
|
11
12
|
export * from './content/navbar/types';
|
|
12
13
|
export * from './content/header/types';
|
|
13
14
|
export * from './content/footer/types';
|
|
14
15
|
export * from './content/image-card-grid/types';
|
|
15
16
|
export * from './content/login/types';
|
|
17
|
+
export * from './content/image-with-text-section/types';
|
|
16
18
|
export * from './search-results/types';
|
|
17
19
|
export * from './qsm/types';
|
|
18
20
|
export * from './shared/types';
|
|
19
21
|
|
|
20
|
-
export { BookingProduct, BookingWizard, QSM, SearchResults, Navbar, Header, Footer, ImageCardGrid, Login };
|
|
22
|
+
export { BookingProduct, BookingWizard, QSM, SearchResults, Navbar, Header, Footer, ImageCardGrid, Login, ImageWithTextSection };
|
|
@@ -108,6 +108,7 @@
|
|
|
108
108
|
|
|
109
109
|
&__description {
|
|
110
110
|
margin-bottom: 15px;
|
|
111
|
+
|
|
111
112
|
&__title {
|
|
112
113
|
color: var(--tide-booking-image-with-text-card-description-title-color);
|
|
113
114
|
font-family: var(--tide-booking-image-with-text-card-description-title-font-family);
|
|
@@ -141,30 +142,14 @@
|
|
|
141
142
|
}
|
|
142
143
|
}
|
|
143
144
|
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
&--no-card {
|
|
147
|
-
.image-with-text__card__content {
|
|
148
|
-
@include mixins.media-md {
|
|
149
|
-
padding: 50px 30px;
|
|
150
|
-
padding-left: 0px;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.image-with-text__card__image {
|
|
155
|
-
&__wrapper {
|
|
156
|
-
border-radius: 16px;
|
|
157
|
-
box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
145
|
|
|
161
|
-
|
|
146
|
+
&--no-card {
|
|
162
147
|
padding: 0px;
|
|
163
148
|
box-shadow: none;
|
|
164
149
|
border: none;
|
|
165
150
|
overflow: visible;
|
|
166
151
|
|
|
167
|
-
|
|
152
|
+
&.image-with-text__card--reverse {
|
|
168
153
|
.image-with-text__card__content {
|
|
169
154
|
@include mixins.media-md {
|
|
170
155
|
padding: 50px 30px;
|
|
@@ -172,31 +157,27 @@
|
|
|
172
157
|
}
|
|
173
158
|
}
|
|
174
159
|
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
&--full-img {
|
|
179
|
-
.image-with-text__card__content {
|
|
180
|
-
padding: 20px;
|
|
181
|
-
padding-top: 0px;
|
|
182
160
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
161
|
+
.image-with-text__card__content {
|
|
162
|
+
@include mixins.media-md {
|
|
163
|
+
padding: 50px 30px;
|
|
164
|
+
padding-left: 0px;
|
|
165
|
+
}
|
|
186
166
|
}
|
|
187
|
-
}
|
|
188
167
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
168
|
+
.image-with-text__card__image {
|
|
169
|
+
&__wrapper {
|
|
170
|
+
border-radius: 16px;
|
|
171
|
+
box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
|
|
172
|
+
}
|
|
192
173
|
}
|
|
193
174
|
}
|
|
194
175
|
|
|
195
|
-
|
|
176
|
+
&--full-img {
|
|
196
177
|
padding: 0px;
|
|
197
178
|
border: none;
|
|
198
179
|
|
|
199
|
-
|
|
180
|
+
&.image-with-text__card--reverse {
|
|
200
181
|
.image-with-text__card__content {
|
|
201
182
|
@include mixins.media-md {
|
|
202
183
|
padding: 50px 30px;
|
|
@@ -204,6 +185,22 @@
|
|
|
204
185
|
}
|
|
205
186
|
}
|
|
206
187
|
}
|
|
188
|
+
|
|
189
|
+
.image-with-text__card__content {
|
|
190
|
+
padding: 20px;
|
|
191
|
+
padding-top: 0px;
|
|
192
|
+
|
|
193
|
+
@include mixins.media-md {
|
|
194
|
+
padding: 50px 30px;
|
|
195
|
+
padding-left: 0px;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.image-with-text__card__image {
|
|
200
|
+
&__wrapper {
|
|
201
|
+
border-radius: 0px;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
207
204
|
}
|
|
208
205
|
}
|
|
209
206
|
}
|