@types/markdown-navbar
TypeScript icon, indicating that this package has built-in type declarations

1.4.4 • Public • Published

Installation

npm install --save @types/markdown-navbar

Summary

This package contains type definitions for markdown-navbar (https://github.com/parksben/markdown-navbar).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/markdown-navbar.

index.d.ts

import { JSX, MouseEvent } from "react";

declare namespace MarkdownNavbar {
    interface MarkdownNavbarProps {
        /** The className that defines the outermost container of navbar */
        className?: string;
        /** Markdown text content */
        source: string;
        /** Anchor displacement relative to the top of the window (for the anchor jump) */
        headingTopOffset?: number;
        /** Automatically update the hash value of browser address when page scrolling if true */
        updateHashAuto?: boolean;
        /** Use the text of the title from Markdown content as the hash value for the anchor if true */
        declarative?: boolean;
        /** Whether the title contains a numerical prefix, such as: 1. 2. 2.2 */
        ordered?: boolean;
        /** The event callback function after clicking navbar item */
        onNavItemClick?: (event: MouseEvent<HTMLDivElement>, element: HTMLDivElement, hashValue: string) => void;
        /** The event callback function before the hash value of browser address changing */
        onHashChange?: (newHash: string, oldHash: string) => void;
    }
}

declare function MarkdownNavbar(options: MarkdownNavbar.MarkdownNavbarProps): JSX.Element;

export = MarkdownNavbar;

Additional Details

  • Last updated: Mon, 04 Dec 2023 17:35:44 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Luqman Rizal.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/markdown-navbar

Weekly Downloads

77

Version

1.4.4

License

MIT

Unpacked Size

5.17 kB

Total Files

5

Last publish

Collaborators

  • types