hds-web 1.5.3 → 1.5.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.css +2 -2
- package/dist/index.es.css +2 -2
- package/dist/index.es.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/HDS/components/Hero/h3.js +38 -28
- package/src/HDS/components/Tables/index.js +1 -1
- package/src/HDS/components/Tables/tableD.js +176 -237
- package/src/HDS/components/Tabs/tab.js +35 -14
- package/src/styles/tailwind.css +57 -35
@@ -7,27 +7,28 @@ import { Tab } from '../../components/Tabs';
|
|
7
7
|
import PropTypes from 'prop-types';
|
8
8
|
import { LinkCard } from '../Cards/Link';
|
9
9
|
|
10
|
-
|
10
|
+
|
11
|
+
const tabCard = (Content) => (
|
11
12
|
<>
|
12
13
|
<div className='tb:px-3'>
|
13
|
-
{
|
14
|
+
{Content.title &&
|
14
15
|
<Typography
|
15
16
|
textStyle='h2'
|
16
|
-
className={HDSColor(
|
17
|
-
{
|
17
|
+
className={HDSColor(Content.titleTextColor)}>
|
18
|
+
{Content.title}
|
18
19
|
</Typography>}
|
19
20
|
|
20
|
-
{
|
21
|
+
{Content.subTitle &&
|
21
22
|
<Typography
|
22
23
|
textStyle='sub2'
|
23
|
-
className={`mt-2 ${HDSColor(
|
24
|
-
{
|
24
|
+
className={`mt-2 ${HDSColor(Content.subTitleTextColor)}`}>
|
25
|
+
{Content.subTitle}
|
25
26
|
</Typography>}
|
26
27
|
</div>
|
27
|
-
{
|
28
|
+
{Content.btnLabel &&
|
28
29
|
<div className='flex pl-3 pt-6'>
|
29
30
|
<HDSButton
|
30
|
-
label={
|
31
|
+
label={Content.btnLabel}
|
31
32
|
type='secondary'
|
32
33
|
leftIconVariant='none'
|
33
34
|
rightIconVariant='none'
|
@@ -46,15 +47,16 @@ const tabCard = (tabContent) => (
|
|
46
47
|
)
|
47
48
|
|
48
49
|
export default function HeroCapability(props) {
|
50
|
+
console.log(props.heroData);
|
49
51
|
|
50
52
|
const LinkCardsFn = (heroData) => {
|
51
53
|
return (
|
52
54
|
heroData.linkCards && (
|
53
|
-
<div className="flex px-8 tb:px-0 tb:justify-center overflow-
|
55
|
+
<div className="flex px-8 tb:px-0 tb:justify-center overflow-auto scrollbar-hide flex-row mt-16 gap-6 tb:flex-row ">
|
54
56
|
{heroData.linkCards.map((card, index) => (
|
55
57
|
<div key={index} className="w-full pb-2 min-w-[11.5rem] max-w-[22.313rem]">
|
56
58
|
<LinkCard
|
57
|
-
|
59
|
+
titleTextColor= {card.titleTextColor}
|
58
60
|
descTextColor={card.descTextColor}
|
59
61
|
linkUrl={card.linkUrl}
|
60
62
|
cardBgColor={card.cardBgColor}
|
@@ -90,38 +92,45 @@ export default function HeroCapability(props) {
|
|
90
92
|
else return;
|
91
93
|
// Perform any other actions based on the clicked tab
|
92
94
|
}
|
93
|
-
let
|
95
|
+
let heroBgColorClass = '';
|
94
96
|
let bgTabClass = '';
|
95
|
-
let
|
96
|
-
let
|
97
|
+
let videoUrl = '';
|
98
|
+
let videoPoster = '';
|
97
99
|
let img_url = '';
|
98
|
-
|
99
|
-
|
100
|
+
let pillColorClass= '';
|
101
|
+
if(props.heroData && props.heroData.tabContent && props.heroData.tabContent[activeTab] && props.heroData.tabContent[activeTab]['heroBgColor']){
|
102
|
+
heroBgColorClass = HDSColor(props.heroData.tabContent[activeTab]['heroBgColor'])
|
100
103
|
}
|
101
|
-
if(props.heroData && props.heroData.tabContent && props.heroData.tabContent[activeTab] && props.heroData.tabContent[activeTab]['
|
102
|
-
bgTabClass = HDSColor(props.heroData.tabContent[activeTab]['
|
104
|
+
if(props.heroData && props.heroData.tabContent && props.heroData.tabContent[activeTab] && props.heroData.tabContent[activeTab]['bgColorTab']){
|
105
|
+
bgTabClass = HDSColor(props.heroData.tabContent[activeTab]['bgColorTab'])
|
103
106
|
}
|
104
|
-
if(props.heroData && props.heroData.tabContent && props.heroData.tabContent[activeTab] && props.heroData.tabContent[activeTab]['
|
105
|
-
|
107
|
+
if(props.heroData && props.heroData.tabContent && props.heroData.tabContent[activeTab] && props.heroData.tabContent[activeTab]['videoUrl']){
|
108
|
+
videoUrl = props.heroData.tabContent[activeTab]['videoUrl']
|
106
109
|
}
|
107
|
-
if(props.heroData && props.heroData.tabContent && props.heroData.tabContent[activeTab] && props.heroData.tabContent[activeTab]['
|
108
|
-
|
110
|
+
if(props.heroData && props.heroData.tabContent && props.heroData.tabContent[activeTab] && props.heroData.tabContent[activeTab]['videoPoster']){
|
111
|
+
videoPoster = props.heroData.tabContent[activeTab]['videoPoster']
|
109
112
|
}
|
110
113
|
if(props.heroData && props.heroData.tabContent && props.heroData.tabContent[activeTab] && props.heroData.tabContent[activeTab]['img_url']){
|
111
114
|
img_url = props.heroData.tabContent[activeTab]['img_url']
|
112
115
|
}
|
116
|
+
if(props.heroData && props.heroData.tabContent && props.heroData.tabContent[activeTab] && props.heroData.tabContent[activeTab]['pillColor']){
|
117
|
+
pillColorClass = props.heroData.tabContent[activeTab]['pillColor']
|
118
|
+
}
|
113
119
|
|
114
120
|
return (
|
115
|
-
<div className={`${
|
121
|
+
<div className={`${(heroBgColorClass)} max-w-7xl rounded-3xl`} >
|
122
|
+
{/* <div className={`${(heroBgColorClass)} max-w-7xl rounded-3xl bg-gradient-to-br from-green-500 to-green-900`} > */}
|
116
123
|
{props.heroData.navTabs &&
|
117
124
|
|
118
125
|
<div className='py-5 db:p-20 tb:p-10 flex flex-col shadow rounded-2xl'>
|
119
126
|
|
120
127
|
<div className='flex px-8 tb:px-0 overflow-scroll scrollbar-hide tb-l:justify-center justify-start'>
|
121
|
-
<div className={`${bgTabClass}
|
128
|
+
<div className={`${bgTabClass} p-1 rounded-[32px]`}>
|
122
129
|
<Tab
|
123
130
|
onTabClick={handleTabClick}
|
124
131
|
tabs={props.heroData.navTabs}
|
132
|
+
bgColorTab={props.heroData.bgColorTab}
|
133
|
+
pillColor={pillColorClass}
|
125
134
|
/>
|
126
135
|
</div>
|
127
136
|
</div>
|
@@ -133,15 +142,16 @@ export default function HeroCapability(props) {
|
|
133
142
|
</div>
|
134
143
|
<div className=' db:max-w-[540px] tb:w-1/2 '>
|
135
144
|
<MediaBox
|
136
|
-
video_url = {
|
137
|
-
video_poster = {
|
138
|
-
|
145
|
+
video_url = {videoUrl}
|
146
|
+
video_poster = {videoPoster}
|
147
|
+
|
139
148
|
/>
|
140
149
|
</div>
|
141
150
|
</div>
|
142
151
|
|
143
152
|
<div>
|
144
|
-
{
|
153
|
+
{props.heroData.tabContent[activeTab] &&
|
154
|
+
LinkCardsFn(props.heroData.tabContent[activeTab])}
|
145
155
|
</div>
|
146
156
|
</div>
|
147
157
|
|