PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / trunk
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce vtrunk
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 1.1.21 All 160 releases
cartflows / wizard / assets / src / fields / Tooltip.js

Tooltip.js in CartFlows – Funnel Builder & Checkout Plugin for WooCommerce trunk, at wizard/assets/src/fields/Tooltip.js

41 lines 840 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import React from 'react';
2 import parse from 'html-react-parser';
3 import './Tooltip.scss';
4 import { QuestionMarkCircleIcon } from '@heroicons/react/24/outline';
5 import classnames from 'classnames';
6
7 function Tooltip( props ) {
8 const {
9 text,
10 position = 'default',
11 classes = 'text-gray-400',
12 descClass = '',
13 icon = '',
14 } = props;
15 return (
16 <div
17 className={ classnames(
18 classes,
19 'wcf-tooltip-icon cursor-pointer ml-1',
20 'default' !== position
21 ? 'wcf-tooltip-position--' + position
22 : ''
23 ) }
24 >
25 { '' === icon ? (
26 <QuestionMarkCircleIcon className={ `w-4 h-4 stroke-2` } />
27 ) : (
28 icon
29 ) }
30
31 { '' !== text && (
32 <span className={ `wcf-tooltip-text ${ descClass }` }>
33 { typeof text === 'string' ? parse( text ) : text }
34 </span>
35 ) }
36 </div>
37 );
38 }
39
40 export default Tooltip;
41