Hex Core JS
    Preparing search index...

    Function useBodyClassName

    • Adds the given CSS className to the HTML <body> element when the condition is true and removes the className on unmount or when the condition is false.

      Parameters

      • className: string

        The CSS class to add to the HTML <body> element.

      • condition: boolean = true

        Indicates whether to add the class or not.

      Returns void