All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.js.ddm_template_editor.components.Button.js Maven / Gradle / Ivy

There is a newer version: 1.0.95
Show newest version
/**
 * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
 * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
 */

import ClayButton from '@clayui/button';
import ClayIcon from '@clayui/icon';
import ClayPopover from '@clayui/popover';
import PropTypes from 'prop-types';
import React, {useState} from 'react';

const noop = () => {};

export function Button({label, onClick = noop, tooltip}) {
	const [showPreview, setShowPreview] = useState(false);

	return (
		
			{label}

			 setShowPreview(false)}
						onFocus={() => setShowPreview(true)}
						onMouseLeave={() => setShowPreview(false)}
						onMouseOver={() => setShowPreview(true)}
						symbol="info-circle-open"
						tabIndex="0"
					/>
				}
			>
				
); } Button.propTypes = { label: PropTypes.string.isRequired, onClick: PropTypes.func, tooltip: PropTypes.string.isRequired, };




© 2015 - 2025 Weber Informatics LLC | Privacy Policy