@talend/react-containers
Version:
Provide connected components aka containers for @talend/react-cmf based on @talend/react-components.
21 lines (19 loc) • 670 B
JavaScript
import { DEFAULT_STATE } from './TabBar.connect';
/**
* Selector on the state from the tabbar id given.
* @param {object} state
* @param {string} idComponent
*/
import { TabBar } from "@talend/react-components";
export function getComponentState(state, idComponent) {
return state.cmf.components.getIn([TabBar.displayName, idComponent], DEFAULT_STATE);
}
/**
* Return the selectedKey attr from the state of tabbar id given.
* @param {object} state
* @param {string} idComponent
*/
export function getSelectedKey(state, idComponent) {
return getComponentState(state, idComponent).get('selectedKey', undefined);
}
//# sourceMappingURL=TabBar.selectors.js.map