import { createContext, PropsWithChildren, useContext, useState } from "react"; type IONewTypefaceContextType = { newTypefaceEnabled: boolean; setNewTypefaceEnabled: (newTypefaceEnabled: boolean) => void; }; /** * Experimental Context for new UI Representations */ export const IONewTypefaceContext = createContext({ newTypefaceEnabled: true, setNewTypefaceEnabled: () => void 0 }); export const useIONewTypeface = () => useContext(IONewTypefaceContext); type IOExperimentalContextProviderProps = { isNewTypefaceEnabled?: boolean; }; export const IONewTypefaceContextProvider = ({ children, isNewTypefaceEnabled }: PropsWithChildren) => { const [newTypefaceEnabled, setNewTypefaceEnabled] = useState( isNewTypefaceEnabled ?? true ); return ( {children} ); };