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

    Props for the Polls component.

    interface PollsProps {
        colors?: Partial<PollsColors>;
        isOwner: boolean;
        labels?: Partial<PollsLabels>;
        localUserId: string;
        onClosePoll?: (pollId: string) => void;
        onCreatePoll: (
            question: string,
            type: "multiple-choice" | "yes-no",
            options?: string[],
        ) => void;
        onVote: (pollId: string, optionId: string) => void;
        polls: Poll[];
    }
    Index

    Properties

    colors?: Partial<PollsColors>

    Partial color overrides merged with built-in defaults. See PollsColors.

    isOwner: boolean

    Whether the local user is the room owner. Owners can create and close polls.

    labels?: Partial<PollsLabels>

    Partial label overrides merged with built-in defaults. See PollsLabels.

    localUserId: string

    The local user's ID. Used to highlight which option the user voted for.

    onClosePoll?: (pollId: string) => void

    Called when the owner closes an active poll.

    onCreatePoll: (
        question: string,
        type: "multiple-choice" | "yes-no",
        options?: string[],
    ) => void

    Called when the user creates a new poll via the creation form.

    onVote: (pollId: string, optionId: string) => void

    Called when the user votes on a poll option.

    polls: Poll[]

    Array of polls to display. Typically from usePolls.