@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.
16 lines (14 loc) • 534 B
text/typescript
import { useSettingsActions } from '../../stores/settings/useSettingsActions.js'
import type { Appearance } from '../../types/widget.js'
import { useSettingsStore } from './useSettingsStore.js'
export const useAppearance = (): [
Appearance,
(appearance: Appearance) => void,
] => {
const { setValue } = useSettingsActions()
const appearance = useSettingsStore((state) => state.appearance)
const setAppearance = (appearance: Appearance) => {
setValue('appearance', appearance)
}
return [appearance, setAppearance]
}