diff --git a/docs/_react/bulma-customizer/src/App.jsx b/docs/_react/bulma-customizer/src/App.jsx index 1c490f16..51747a41 100644 --- a/docs/_react/bulma-customizer/src/App.jsx +++ b/docs/_react/bulma-customizer/src/App.jsx @@ -138,6 +138,7 @@ const PAGE_IDS = { }; export const CustomizerContext = createContext({ + isOpen: false, cssvars: {}, currentTab: "", currentPage: "", @@ -150,6 +151,7 @@ export const CustomizerContext = createContext({ function App() { const styleRef = useRef(); const initialContext = { + isOpen: true, cssvars: {}, currentTab: "Global Variables", currentPage: "delete", @@ -201,6 +203,17 @@ function App() { context.changePage(pageId); }; + const handleOpening = (event) => { + event.preventDefault(); + + setContext((context) => { + return { + ...context, + isOpen: !context.isOpen, + }; + }); + }; + useEffect(() => { const styles = { root: window.getComputedStyle(document.documentElement), @@ -400,10 +413,21 @@ function App() { "--bulma-tabs-link-active-color": "var(--bulma-primary)", }; + const appClass = classNames({ + [cn.app]: true, + [cn.open]: context.isOpen, + }); + + const buttonClass = classNames({ + [cn.button]: true, + "button is-primary": true, + }); + return (