// Tweaks for the Myfab site function MyfabTweaks() { const [t, setTweak] = useTweaks(window.__myfabDefaults); // Apply tweaks to document React.useEffect(() => { document.documentElement.setAttribute('data-palette', t.palette); window.__myfabTweaks = t; window.dispatchEvent(new CustomEvent('myfab-tweaks', { detail: t })); }, [t]); return ( setTweak('palette', v)} options={[ { value: 'light', label: 'Light' }, { value: 'midnight', label: 'Midnight' }, { value: 'cream', label: 'Cream' }, ]} /> setTweak('heroVariant', v)} options={[ { value: 'a', label: 'A · Editorial' }, { value: 'b', label: 'B · Monolith' }, { value: 'c', label: 'C · Manifesto' }, ]} /> setTweak('houseOverlay', v)} options={[ { value: 'off', label: 'Off' }, { value: 'soft', label: 'Soft' }, { value: 'strong', label: 'Strong' }, ]} /> ); } Object.assign(window, { MyfabTweaks });