@navikt/ds-react
Version:
React components from the Norwegian Labour and Welfare Administration.
15 lines • 398 B
JavaScript
import { createContext, useContext } from "react";
export const RowContext = createContext({
periods: [],
id: "",
active: false,
index: 0,
});
export const useRowContext = () => {
const context = useContext(RowContext);
if (!context) {
console.warn("useRowContext must be used with RowContext");
}
return context;
};
//# sourceMappingURL=useRowContext.js.map