How to use clay-tooltip - 1 common examples

To help you get started, we’ve selected a few clay-tooltip examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github liferay / alloy-editor / src / components / CodeClipboard / CodeClipboard.js View on Github external
constructor() {
		const selector = '.code-container .btn-copy';

		this.clayTooltip = new ClayTooltip(new SingletonEnforcer());
		this.clayClipboard = new Clipboard({
			selector,
			text: delegateTarget => {
				delegateTarget.setAttribute('title', 'Copied');

				setTimeout(() => {
					delegateTarget.setAttribute('title', 'Copy');
				}, 2000);

				return delegateTarget.parentNode.querySelector('pre code')
					.innerText;
			},
		});
	}

clay-tooltip

Clay Tooltip Component

BSD-3-Clause
Latest version published 2 years ago

Package Health Score

49 / 100
Full package analysis

Popular clay-tooltip functions