UNPKG

@wordpress/global-styles-ui

Version:
18 lines (17 loc) • 476 B
// packages/global-styles-ui/src/presets/use-presets.ts import { useSetting } from "../hooks.mjs"; var EMPTY_ARRAY = []; function usePresets(settingsPath, origin) { const path = `${settingsPath}.${origin}`; const [presets = EMPTY_ARRAY, setPresets] = useSetting(path); const [basePresets = EMPTY_ARRAY] = useSetting( path, void 0, "base" ); return { presets, basePresets, setPresets }; } export { usePresets }; //# sourceMappingURL=use-presets.mjs.map