@@ -2,7 +2,6 @@ import React, { Fragment, useEffect, useRef, useState } from "react";
2
2
import throttle from "lodash.throttle" ;
3
3
import type { PricingDataFeature } from "./types" ;
4
4
import Icon from "../Icon" ;
5
- import FeaturedLink from "../FeaturedLink" ;
6
5
import LinkButton from "../LinkButton" ;
7
6
import { IconName } from "../Icon/types" ;
8
7
import Tooltip from "../Tooltip" ;
@@ -103,12 +102,15 @@ const PricingCards = ({ data, delimiter }: PricingCardsProps) => {
103
102
) }
104
103
>
105
104
{ data . map (
106
- ( { title, description, price, cta, sections, border } , index ) => (
105
+ (
106
+ { title, description, price, cta, sections, border, bottomCta } ,
107
+ index ,
108
+ ) => (
107
109
< Fragment key = { title . content } >
108
110
{ delimiterColumn ( index ) }
109
111
< div
110
112
className = { cn (
111
- "relative border flex-1 px-6 py-8 flex flex-col gap-6 rounded-2xl group min-w-[17rem] backdrop-blur" ,
113
+ "relative border flex-1 px-6 pt-6 pb-4 flex flex-col gap-6 rounded-2xl group min-w-[17rem] backdrop-blur bg-neutral-100 dark:bg-neutral-1200 " ,
112
114
borderClasses ( border ?. color ) ?. border ??
113
115
"border-neutral-200 dark:border-neutral-1100" ,
114
116
border ?. style ,
@@ -130,35 +132,27 @@ const PricingCards = ({ data, delimiter }: PricingCardsProps) => {
130
132
</ div >
131
133
) : null }
132
134
< div
133
- className = { cn (
134
- "absolute z-0 top-0 left-0 w-full h-full rounded-2xl bg-neutral-000 dark:bg-neutral-1300 transition-[colors,opacity] opacity-25" ,
135
- {
136
- "group-hover:bg-neutral-100 dark:group-hover:bg-neutral-1200 group-hover:opacity-100" :
137
- ! delimiter ,
138
- } ,
139
- ) }
140
- > </ div >
141
- < div
142
- className = { cn ( `relative z-10 flex flex-col gap-6` , {
135
+ className = { cn ( `relative z-10 flex flex-col gap-4` , {
143
136
"@[520px]:flex-1 @[920px]:flex-none" : delimiter ,
144
137
} ) }
145
138
>
146
139
< div >
147
- < div className = "flex items-center mb-3 " >
140
+ < div className = "flex items-center mb-1 " >
148
141
< p className = { cn ( title . className , title . color ) } >
149
142
{ title . content }
150
143
</ p >
151
144
{ title . tooltip ? (
152
145
< Tooltip
153
146
interactive = { typeof title . tooltip !== "string" }
147
+ iconSize = "1.25rem"
154
148
>
155
149
{ title . tooltip }
156
150
</ Tooltip >
157
151
) : null }
158
152
</ div >
159
153
< p
160
154
className = { cn (
161
- "ui-text-p1 min- h-5" ,
155
+ "ui-text-h1 text-h1-xl h-5 block " ,
162
156
description . className ,
163
157
description . color ,
164
158
) }
@@ -175,7 +169,7 @@ const PricingCards = ({ data, delimiter }: PricingCardsProps) => {
175
169
delimiter ,
176
170
} ) }
177
171
>
178
- < p className = "ui-text-title font-medium tracking-tight leading-none text-neutral-1300 dark:text-neutral-000" >
172
+ < p className = "ui-text-h1 text-h1-xl font-medium tracking-tight leading-none text-neutral-1300 dark:text-neutral-000" >
179
173
{ price . amount }
180
174
</ p >
181
175
< div className = "ui-text-p3 text-neutral-1300 dark:text-neutral-000" >
@@ -192,7 +186,7 @@ const PricingCards = ({ data, delimiter }: PricingCardsProps) => {
192
186
href = { cta . url }
193
187
onClick = { cta . onClick }
194
188
disabled = { cta . disabled }
195
- rightIcon = "icon-gui-arrow-long- right-outline"
189
+ rightIcon = "icon-gui-arrow-right-outline"
196
190
iconColor = { cta . iconColor }
197
191
>
198
192
{ cta . text }
@@ -204,15 +198,13 @@ const PricingCards = ({ data, delimiter }: PricingCardsProps) => {
204
198
</ div >
205
199
) }
206
200
</ div >
207
- < div className = "flex-1 flex flex -col gap-6 relative z-10" >
208
- { sections . map ( ( { title, items, listItemColors, cta } ) => (
201
+ < div className = "flex flex-col gap-4 relative z-10 flex-grow " >
202
+ { sections . map ( ( { title, items, listItemColors } ) => (
209
203
< div key = { title } className = "flex flex-col gap-3" >
210
- < p className = "text-neutral-800 dark:text-neutral-500 font-mono uppercase text-overline2 tracking-[0.16em] " >
204
+ < p className = "text-neutral-700 dark:text-neutral-600 font-mono uppercase text-overline2 font-medium tracking-[0.12em] h-4 " >
211
205
{ title }
212
206
</ p >
213
- < div
214
- className = { cn ( { "flex flex-col gap-1" : ! delimiter } ) }
215
- >
207
+ < div className = { cn ( { "flex flex-col" : ! delimiter } ) } >
216
208
{ items . map ( ( item , index ) =>
217
209
Array . isArray ( item ) ? (
218
210
< div
@@ -231,7 +223,7 @@ const PricingCards = ({ data, delimiter }: PricingCardsProps) => {
231
223
className = { cn (
232
224
"ui-text-p3" ,
233
225
index === 0 ? "font-bold" : "font-medium" ,
234
- "text-neutral-1000 dark:text-neutral-300" ,
226
+ "text-neutral-1000 dark:text-neutral-300 leading-[1.4rem] " ,
235
227
subIndex % 2 === 1 ? "text-right" : "" ,
236
228
) }
237
229
>
@@ -240,20 +232,19 @@ const PricingCards = ({ data, delimiter }: PricingCardsProps) => {
240
232
) ) }
241
233
</ div >
242
234
) : (
243
- < div key = { item } className = "flex gap-2 items-start" >
235
+ < div key = { item } className = "flex items-start gap-2 " >
244
236
{ listItemColors ? (
245
237
< Icon
246
238
name = "icon-gui-check-circled-fill"
247
239
color = { listItemColors . background }
248
240
secondaryColor = { listItemColors . foreground }
249
241
size = "16px"
250
- additionalCSS = "mt-0.5 "
242
+ additionalCSS = "mt-1 "
251
243
/>
252
244
) : null }
253
245
< div
254
246
className = { cn (
255
- `flex-1 font-medium text-neutral-1000 dark:text-neutral-300` ,
256
- listItemColors ? "ui-text-p3" : "ui-text-p2" ,
247
+ `flex-1 font-medium text-neutral-1000 dark:text-neutral-300 ui-text-p3` ,
257
248
) }
258
249
>
259
250
{ item }
@@ -262,24 +253,32 @@ const PricingCards = ({ data, delimiter }: PricingCardsProps) => {
262
253
) ,
263
254
) }
264
255
</ div >
265
- { cta ? (
266
- < div className = "relative -mx-6 flex items-center h-10 overflow-x-hidden" >
267
- < FeaturedLink
268
- url = { cta . url }
269
- additionalCSS = "absolute translate-x-6 sm:-translate-x-[7.5rem] sm:opacity-0 sm:group-hover:translate-x-6 duration-300 delay-0 sm:group-hover:delay-100 sm:group-hover:opacity-100 transition-[transform,opacity] font-medium ui-text-p3 dark:text-neutral-500 dark:hover:text-neutral-000 cursor-pointer"
270
- onClick = { cta . onClick }
271
- iconColor = { listItemColors ?. foreground }
272
- >
273
- { cta . text }
274
- </ FeaturedLink >
275
- < div className = "absolute hidden sm:block sm:translate-x-6 sm:opacity-100 sm:group-hover:translate-x-[7.5rem] sm:group-hover:opacity-0 duration-200 delay-100 sm:group-hover:delay-0 transition-[transform,opacity] leading-6 tracking-[0.15em] font-light text-p3 text-neutral-500 dark:text-neutral-800" >
276
- •••
277
- </ div >
278
- </ div >
279
- ) : null }
280
256
</ div >
281
257
) ) }
282
258
</ div >
259
+
260
+ { bottomCta && (
261
+ < div >
262
+ < div className = "border-t border-neutral-200 dark:border-neutral-1100 -mx-6" > </ div >
263
+ < a
264
+ href = { bottomCta . url }
265
+ className = { cn (
266
+ "text-[13px] font-sans font-semibold group/bottom-cta cursor-pointer pt-4 flex items-center" ,
267
+ "text-neutral-700 dark:text-neutral-600 hover:text-neutral-1300 dark:hover:text-neutral-000 focus:outline-none focus-visible:outline-gui-focus" ,
268
+ ) }
269
+ >
270
+ { bottomCta . text }
271
+ < Icon
272
+ name = "icon-gui-arrow-down-outline"
273
+ size = "12px"
274
+ color = { bottomCta . iconColor }
275
+ additionalCSS = { cn (
276
+ "align-middle ml-2 relative transition-[bottom] bottom-0 group-hover/bottom-cta:-bottom-0.5" ,
277
+ ) }
278
+ />
279
+ </ a >
280
+ </ div >
281
+ ) }
283
282
</ div >
284
283
{ delimiterColumn ( index ) }
285
284
</ Fragment >
0 commit comments