Hiyve Components - v1.0.0
    Preparing search index...

    Interface TopicPracticeProps

    Props for TopicPractice.

    interface TopicPracticeProps {
        cardColors?: Partial<GameColors>;
        colors?: Partial<MusicHubColors>;
        defaultView?: PracticeView;
        games?: readonly MusicGameDef[];
        labels?: Partial<TopicPracticeLabels>;
        mascot?: false | MascotName;
        omit?: readonly GameKind[];
        onError?: (error: Error) => void;
        onPlayGame?: (
            game: MusicGameDef,
            topic: PracticeTopicId,
            level: Level,
        ) => void;
        onResult?: (result: GameResult) => void;
        onViewChange?: (view: PracticeView) => void;
        player?: { id: string; name?: string };
        resultStore?: ResultStore;
        retryUntilRight?: boolean;
        samples?: SampleSource;
        sounds?: boolean;
        sx?: SxProps<Theme>;
        topics?: readonly PracticeTopic[];
        view?: PracticeView;
    }
    Index

    Properties

    cardColors?: Partial<GameColors>

    The cards' colours on Practice's dark panel

    colors?: Partial<MusicHubColors>
    defaultView?: PracticeView

    Where to open when Practice keeps it (default: the list of topics)

    games?: readonly MusicGameDef[]

    The games a set's score card offers to play the topic with (default: defaultMusicGames); none without onPlayGame

    labels?: Partial<TopicPracticeLabels>
    mascot?: false | MascotName

    The face beside the title, or false for none (default: 'owl')

    omit?: readonly GameKind[]

    Kinds of card Practice leaves out (default: defaultPracticeOmit, the catch and the hop)

    onError?: (error: Error) => void
    onPlayGame?: (game: MusicGameDef, topic: PracticeTopicId, level: Level) => void

    Called when a game is picked from a score card, with the topic and level just practised

    onResult?: (result: GameResult) => void

    Called with each finished set's result, after it is saved

    onViewChange?: (view: PracticeView) => void

    Called with where Practice goes next

    player?: { id: string; name?: string }

    Who is practising, kept with each result

    resultStore?: ResultStore

    Where results are kept: each set is saved there, and stars and the cards missed are read back from it (default: kept in memory while mounted)

    retryUntilRight?: boolean

    After a wrong answer, another go at the same card (default: true)

    samples?: SampleSource

    Recorded instrument samples for the notes, from a host you choose; without it a small built-in voice plays

    sounds?: boolean

    Sounds on (default: true)

    sx?: SxProps<Theme>
    topics?: readonly PracticeTopic[]

    The topics offered, in order: any of practiceTopics, renamed or left out as you like (default: all of them)

    Where Practice is, when the host keeps it (in an address, say)