UNPKG

@sky-mavis/tanto-widget

Version:
16 lines 581 B
import {jsx}from'@emotion/react/jsx-runtime';import {useMemo}from'react';import {WidgetUIConfigContext}from'./WidgetUIConfigContext.mjs';const WidgetUIConfigProvider = ({ children, config: customConfig }) => { const defaultConfig = { markKeylessWalletConnected: false }; const config = useMemo(() => Object.assign({}, defaultConfig, customConfig), [customConfig]); const contextValue = useMemo(() => ({ config }), [config]); return jsx(WidgetUIConfigContext.Provider, { value: contextValue, children: children }); };export{WidgetUIConfigProvider};