PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / trunk
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce vtrunk
3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.1 trunk 1.0.4 1.1.0 1.1.0.1 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 1.1.20 All 161 releases
cartflows / wizard / assets / src / wizard-steps / components / GlobalFlowItem.js

GlobalFlowItem.js in CartFlows – Funnel Builder & Checkout Plugin for WooCommerce trunk, at wizard/assets/src/wizard-steps/components/GlobalFlowItem.js

52 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __ } from '@wordpress/i18n';
2
3 // SCSS.
4 import './GlobalFlowItem.scss';
5
6 function GlobalFlowItem( { item, isChecked, isActive } ) {
7 const { thumbnail_image_url, title, type, is_recommanded } = item;
8
9 return (
10 <>
11 { 'pro' === type ? (
12 <span className={ `wcf-item__type wcf-item__type--${ type }` }>
13 { type }
14 </span>
15 ) : (
16 ''
17 ) }
18
19 <div
20 className={ `wcf-item__inner bg-white border shadow-sm relative overflow-hidden rounded-lg cursor-pointer transition-all block group hover:-translate-y-px hover:border-primary-400 hover:shadow-xl hover:shadow-primary-50 ${
21 isChecked || isActive
22 ? 'border-primary-400'
23 : 'border-slate-200'
24 }` }
25 >
26 { is_recommanded && (
27 <span
28 className={ `wcf-item__recommanded-badge bg-primary-500 border-primary-500 text-white absolute top-0 right-0 px-2.5 py-0.5 font-normal text-xs rounded-tr-lg rounded-bl-lg border cursor-default z-10` }
29 >
30 { __( 'Recommended', 'cartflows' ) }
31 </span>
32 ) }
33 <div className="wcf-item__thumbnail-wrap transition-none">
34 <div
35 className="wcf-item__thumbnail group-hover:transform-none bg-white relative position bg-top bg-cover bg-no-repeat overflow-hidden before:block before:pt-[100%]"
36 style={ {
37 backgroundImage: `url("${ thumbnail_image_url }")`,
38 } }
39 ></div>
40 </div>
41 <div className="wcf-item__heading-wrap py-2.5 px-4 text-center border-t border-slate-200">
42 <div className="wcf-item__heading text-slate-600 text-center text-base font-semibold">
43 { title }
44 </div>
45 </div>
46 </div>
47 </>
48 );
49 }
50
51 export default GlobalFlowItem;
52