@navikt/ds-react
Version:
React components from the Norwegian Labour and Welfare Administration.
19 lines • 572 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.useRowContext = exports.RowContext = void 0;
const react_1 = require("react");
exports.RowContext = (0, react_1.createContext)({
periods: [],
id: "",
active: false,
index: 0,
});
const useRowContext = () => {
const context = (0, react_1.useContext)(exports.RowContext);
if (!context) {
console.warn("useRowContext must be used with RowContext");
}
return context;
};
exports.useRowContext = useRowContext;
//# sourceMappingURL=useRowContext.js.map
;