MCPcopy Create free account
hub / github.com/docker/getting-started / useTabContext

Function useTabContext

app/src/static/js/react-bootstrap.js:16886–16905  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

16884};
16885
16886function useTabContext(props) {
16887 var context = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useContext"])(src_TabContext);
16888 if (!context) return props;
16889
16890 var activeKey = context.activeKey,
16891 getControlledId = context.getControlledId,
16892 getControllerId = context.getControllerId,
16893 rest = _objectWithoutPropertiesLoose(context, ["activeKey", "getControlledId", "getControllerId"]);
16894
16895 var shouldTransition = props.transition !== false && rest.transition !== false;
16896 var key = makeEventKey(props.eventKey);
16897 return _extends({}, props, {
16898 active: props.active == null && key != null ? makeEventKey(activeKey) === key : props.active,
16899 id: getControlledId(props.eventKey),
16900 'aria-labelledby': getControllerId(props.eventKey),
16901 transition: shouldTransition && (props.transition || rest.transition || src_Fade),
16902 mountOnEnter: props.mountOnEnter != null ? props.mountOnEnter : rest.mountOnEnter,
16903 unmountOnExit: props.unmountOnExit != null ? props.unmountOnExit : rest.unmountOnExit
16904 });
16905}
16906
16907var TabPane = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.forwardRef(function (props, ref) {
16908 var _useTabContext = useTabContext(props),

Callers 1

react-bootstrap.jsFile · 0.85

Calls 3

makeEventKeyFunction · 0.85
_extendsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…