# cartflows/3.1.2/wizard/assets/src/fields/Tooltip.js

CartFlows – Funnel Builder &amp; Checkout Plugin for WooCommerce, version 3.1.2. 41 lines.

- Page: https://pluginprobe.com/plugins/cartflows/3.1.2/code/wizard/assets/src/fields/Tooltip.js
- Raw: https://pluginprobe.com/plugins/cartflows/3.1.2/raw/wizard/assets/src/fields/Tooltip.js
- Modified: 2025-03-05T12:40:40+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/cartflows/3.1.2/code/wizard/assets/src/fields/Tooltip.js#L10-L20`.

```javascript
import React from 'react';
import parse from 'html-react-parser';
import './Tooltip.scss';
import { QuestionMarkCircleIcon } from '@heroicons/react/24/outline';
import classnames from 'classnames';

function Tooltip( props ) {
	const {
		text,
		position = 'default',
		classes = 'text-gray-400',
		descClass = '',
		icon = '',
	} = props;
	return (
		<div
			className={ classnames(
				classes,
				'wcf-tooltip-icon cursor-pointer ml-1',
				'default' !== position
					? 'wcf-tooltip-position--' + position
					: ''
			) }
		>
			{ '' === icon ? (
				<QuestionMarkCircleIcon className={ `w-4 h-4 stroke-2` } />
			) : (
				icon
			) }

			{ '' !== text && (
				<span className={ `wcf-tooltip-text ${ descClass }` }>
					{ typeof text === 'string' ? parse( text ) : text }
				</span>
			) }
		</div>
	);
}

export default Tooltip;

```
