UNPKG

@lifi/widget

Version:

LI.FI Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.

19 lines 587 B
import { create } from 'zustand'; export const useInputModeStore = create((set, get) => ({ inputMode: { from: 'amount', to: 'amount', }, setInputMode: (formType, mode) => set((state) => ({ inputMode: { ...state.inputMode, [formType]: mode, }, })), toggleInputMode: (formType) => { const currentMode = get().inputMode[formType]; const newMode = currentMode === 'amount' ? 'price' : 'amount'; get().setInputMode(formType, newMode); }, })); //# sourceMappingURL=useInputModeStore.js.map