UNPKG

@giancosta86/omnicourse

Version:

Interactive, React-based drill-down analysis of your learning experience

22 lines 1.03 kB
import { ReactNode } from "react"; import { TaxonomyKey, TaxonomyRepository, Subject, TaxonomyLevel, TaxonomyPath } from "@giancosta86/omnicourse-core"; export declare type TaxonomyKeysFetcher = () => Promise<readonly TaxonomyKey[]>; export interface LearningContext { taxonomyKeys?: readonly TaxonomyKey[]; taxonomyPath?: TaxonomyPath; currentLevel?: TaxonomyLevel; selectedTaxonomyKey?: TaxonomyKey; onMobile: boolean; setSelectedTaxonomyId: (taxonomyId: string) => void; pushToTaxonomyPath: (subject: Subject) => void; revertTaxonomyPathTo: (taxonomyLevel: TaxonomyLevel) => void; } export declare const useLearningContext: () => LearningContext; export interface Props { onMobile: boolean; taxonomyKeysFetcher: TaxonomyKeysFetcher; taxonomyRepository: TaxonomyRepository; children: ReactNode; } export declare const LearningContextProvider: ({ onMobile, taxonomyKeysFetcher, taxonomyRepository, children }: Props) => JSX.Element; //# sourceMappingURL=LearningContext.d.ts.map