UNPKG

@talend/react-containers

Version:

Provide connected components aka containers for @talend/react-cmf based on @talend/react-components.

27 lines (25 loc) 850 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getComponentState = getComponentState; exports.getSelectedKey = getSelectedKey; var _TabBar = require("./TabBar.connect"); var _reactComponents = require("@talend/react-components"); /** * Selector on the state from the tabbar id given. * @param {object} state * @param {string} idComponent */ function getComponentState(state, idComponent) { return state.cmf.components.getIn([_reactComponents.TabBar.displayName, idComponent], _TabBar.DEFAULT_STATE); } /** * Return the selectedKey attr from the state of tabbar id given. * @param {object} state * @param {string} idComponent */ function getSelectedKey(state, idComponent) { return getComponentState(state, idComponent).get('selectedKey', undefined); } //# sourceMappingURL=TabBar.selectors.js.map