| 1 |
import { create } from 'zustand' |
| 2 |
import { devtools, persist } from 'zustand/middleware' |
| 3 |
|
| 4 |
// Similiar to Global.js but syncronous ("faster") |
| 5 |
const state = (set) => ({ |
| 6 |
designColors: {}, |
| 7 |
setDesignColors(designColors) { |
| 8 |
set({ designColors }) |
| 9 |
}, |
| 10 |
}) |
| 11 |
|
| 12 |
export const useGlobalSyncStore = create( |
| 13 |
persist(devtools(state, { name: 'Extendify Library Globals Sync' }), { |
| 14 |
name: 'extendify-library-globals-sync', |
| 15 |
}), |
| 16 |
state, |
| 17 |
) |
| 18 |
|