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

META-INF.resources.js.components.VariationsNav.DropDownItem.js Maven / Gradle / Ivy

The 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 ClayDropDown from '@clayui/drop-down';
import ClayIcon from '@clayui/icon';
import PropTypes from 'prop-types';
import React from 'react';

const DropDownItem = ({
	cssClasses,
	deleteAction = false,
	direction,
	disabled,
	icon,
	index,
	onClick,
	text,
}) => {
	const handleClick = () => {
		onClick({deleteAction, direction, index});
	};

	return (
		
			
				

				{text}
			
		
	);
};

DropDownItem.defaultProps = {
	direction: null,
};

DropDownItem.propTypes = {
	cssClasses: PropTypes.string,
	direction: PropTypes.number,
	disabled: PropTypes.bool.isRequired,
	icon: PropTypes.string.isRequired,
	index: PropTypes.number.isRequired,
	onClick: PropTypes.func.isRequired,
	text: PropTypes.string.isRequired,
};

export default DropDownItem;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy