PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / 3.3.0
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce v3.3.0
3.3.0 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 All 162 releases
cartflows / wizard / assets / src / fields / Tooltip.js

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

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