Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "hooks/useMultipleDisclosure"

Index

Type aliases

Functions

Type aliases

MultipleDisclosure

MultipleDisclosure<T>: { isOpen: (id: T | string) => boolean; onClose: (id: T | string) => () => void; onOpen: (id: T | string) => () => void; onToggle: (id: T | string) => () => void }

Type parameters

  • T

Type declaration

  • isOpen: (id: T | string) => boolean
      • (id: T | string): boolean
      • Parameters

        • id: T | string

        Returns boolean

  • onClose: (id: T | string) => () => void
      • (id: T | string): () => void
      • Parameters

        • id: T | string

        Returns () => void

          • (): void
          • Returns void

  • onOpen: (id: T | string) => () => void
      • (id: T | string): () => void
      • Parameters

        • id: T | string

        Returns () => void

          • (): void
          • Returns void

  • onToggle: (id: T | string) => () => void
      • (id: T | string): () => void
      • Parameters

        • id: T | string

        Returns () => void

          • (): void
          • Returns void

Functions

useMultipleDisclosure

  • useMultipleDisclosure<T>(initialDisclosures?: T): T extends Record<keyof T, boolean> ? MultipleDisclosure<keyof T> : MultipleDisclosure<string>
  • Type parameters

    • T: Record<string, boolean>

    Parameters

    • Optional initialDisclosures: T

    Returns T extends Record<keyof T, boolean> ? MultipleDisclosure<keyof T> : MultipleDisclosure<string>

Generated using TypeDoc