UNPKG

408 BJavaScriptView Raw
1/* @flow */
2
3import getStateKey from './get-state-key';
4
5const getState = function(
6 state: {_radiumStyleState: {[key: string]: {[value: string]: boolean}}},
7 elementKey: string,
8 value: string,
9): any {
10 const key = getStateKey(elementKey);
11
12 return !!state &&
13 !!state._radiumStyleState &&
14 !!state._radiumStyleState[key] &&
15 state._radiumStyleState[key][value];
16};
17
18export default getState;