$66 GRAYBYTE WORDPRESS FILE MANAGER $64

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/home/bravrvjk/dantho.rw/wp-content/plugins/extendify/src/Agent/components/buttons/

HOME
Current File : /home/bravrvjk/dantho.rw/wp-content/plugins/extendify/src/Agent/components/buttons//Mobile.jsx
import { useEffect, useRef } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
import { chevronUp, Icon } from '@wordpress/icons';
import { magic } from '@agent/icons';
import { useGlobalStore } from '@agent/state/global';

export const Mobile = () => {
	const { isMobile, minimized, setMinimized } = useGlobalStore();
	const ref = useRef(null);

	const minimize = () => setMinimized(false);

	useEffect(() => {
		if (!isMobile || minimized) return;
		// Set button height as root var
		document.body.style.setProperty(
			'--extendify-agent-mobile-btn-height',
			`${ref.current?.offsetHeight}px`,
		);
	}, [isMobile, minimized]);

	useEffect(() => {
		if (!isMobile) return;
		document.body.classList.add('extendify-agent-mobile-btn-open');
		return () => {
			document.body.classList.remove('extendify-agent-mobile-btn-open');
		};
	}, [isMobile]);

	if (!isMobile || !minimized) return null;

	return (
		<button
			ref={ref}
			type="button"
			className="m-0 flex w-full items-center justify-between gap-2 bg-gray-900 px-4 py-3 font-sans text-white shadow-[0_-1px_0_0_rgba(255,255,255,0.05)]"
			onClick={minimize}
			aria-label={__('Open Agent', 'extendify-local')}>
			<div className="flex gap-3">
				<div className="flex h-10 w-10 items-center justify-center rounded-full bg-wp-theme-main">
					<Icon icon={magic} size={24} />
				</div>
				<div className="text-left text-sm rtl:text-right">
					<div className="font-semibold">
						{__('AI Agent', 'extendify-local')}
					</div>
					<div className="text-gray-600">
						{__('How can we help you today?', 'extendify-local')}
					</div>
				</div>
			</div>
			<Icon className="fill-white" icon={chevronUp} size={24} />
		</button>
	);
};


Current_dir [ WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
6 Nov 2025 10.43 AM
bravrvjk / bravrvjk
0755
AdminBar.jsx
1.795 KB
1 Sep 2025 7.55 PM
bravrvjk / bravrvjk
0644
Mobile.jsx
1.681 KB
23 Oct 2025 8.20 PM
bravrvjk / bravrvjk
0644
PostEditor.jsx
1.438 KB
1 Sep 2025 7.55 PM
bravrvjk / bravrvjk
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF