block-styles.js
40 lines
| 1 | import { createReduxStore } from '@wordpress/data'; |
| 2 | import { |
| 3 | currentStyleActions, |
| 4 | currentStyleSelectors, |
| 5 | currentStyleReducer, |
| 6 | nestedRuleActions, |
| 7 | nestedRuleSelectors, |
| 8 | nestedRuleReducer, |
| 9 | atRuleActions, |
| 10 | atRuleSelectors, |
| 11 | atRuleReducer, |
| 12 | } from '@edge22/styles-builder'; |
| 13 | |
| 14 | export const currentStyleStore = createReduxStore( |
| 15 | 'gb-block-styles-current-style', |
| 16 | { |
| 17 | reducer: currentStyleReducer, |
| 18 | actions: currentStyleActions, |
| 19 | selectors: currentStyleSelectors, |
| 20 | } |
| 21 | ); |
| 22 | |
| 23 | export const atRuleStore = createReduxStore( |
| 24 | 'gb-block-styles-at-rule', |
| 25 | { |
| 26 | reducer: atRuleReducer, |
| 27 | actions: atRuleActions, |
| 28 | selectors: atRuleSelectors, |
| 29 | } |
| 30 | ); |
| 31 | |
| 32 | export const nestedRuleStore = createReduxStore( |
| 33 | 'gb-block-styles-nested-rule', |
| 34 | { |
| 35 | reducer: nestedRuleReducer, |
| 36 | actions: nestedRuleActions, |
| 37 | selectors: nestedRuleSelectors, |
| 38 | } |
| 39 | ); |
| 40 |