UNPKG

@gdquest/gd-school-mdx-components

Version:

Components specially made to work with GDSchool MDX lesson files.

108 lines 4.44 kB
/// <reference types="react" /> import PropTypes from "prop-types"; import type { InferProps } from "prop-types"; /******************************************************************************* * * Some Generic Base Utility Components * *******************************************************************************/ export declare function Item({ children, }: InferProps<typeof Item.propTypes>): JSX.Element; export declare namespace Item { var propTypes: { children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>; }; } export declare function Description({ children, }: InferProps<typeof Description.propTypes>): JSX.Element; export declare namespace Description { var propTypes: { children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>; }; } export declare function Option({ children, correct, }: InferProps<typeof Option.propTypes>): JSX.Element; export declare namespace Option { var propTypes: { children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>; correct: PropTypes.Requireable<boolean>; }; } export declare function Title({ children, }: InferProps<typeof Title.propTypes>): JSX.Element; export declare namespace Title { var propTypes: { children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>; }; } export declare function Hints({ children, }: InferProps<typeof Hints.propTypes>): JSX.Element; export declare namespace Hints { var propTypes: { children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>; }; } export declare function Explanation({ children, }: InferProps<typeof Explanation.propTypes>): JSX.Element; export declare namespace Explanation { var propTypes: { children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>; }; } export declare function Goal({ children, }: InferProps<typeof Goal.propTypes>): JSX.Element; export declare namespace Goal { var propTypes: { children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>; }; } export declare function Small({ children, }: InferProps<typeof Small.propTypes>): JSX.Element; export declare namespace Small { var propTypes: { children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>; }; } export declare function Question({ children, randomize, skip, onSubmit, }: InferProps<typeof Question.propTypes>): JSX.Element; export declare namespace Question { var propTypes: { children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>; randomize: PropTypes.Requireable<boolean>; skip: PropTypes.Requireable<boolean>; onSubmit: PropTypes.Requireable<(...args: any[]) => any>; hidden: PropTypes.Requireable<boolean>; }; } export declare function Callout({ children, type, hidden, }: InferProps<typeof Callout.propTypes>): JSX.Element; export declare namespace Callout { var propTypes: { children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>; type: PropTypes.Requireable<string>; hidden: PropTypes.Requireable<boolean>; }; } /******************************************************************************* * Glossary has different views: * - link * - excerpt * - modal box * * And links to the glossary pages * TODO: extract the glossary from learn to code into its own repo */ /******************************************************************************* * A little piece of code that runs and presents something in the console */ export declare function GDSnippet({ title, children, }: InferProps<typeof GDSnippet.propTypes>): JSX.Element; export declare namespace GDSnippet { var propTypes: { title: PropTypes.Requireable<string>; children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>; }; } /******************************************************************************* * * An exercise from the practices * Can have different types that should present differently */ export declare function GDLearnToCode({ children, scene, type, }: InferProps<typeof GDLearnToCode.propTypes>): JSX.Element; export declare namespace GDLearnToCode { var propTypes: { children: PropTypes.Requireable<PropTypes.ReactNodeLike>; scene: PropTypes.Validator<string>; type: PropTypes.Requireable<string>; }; } //# sourceMappingURL=components.d.ts.map