UNPKG

2.09 kBTypeScriptView Raw
1import * as React from 'react';
2import { Sizes } from 'react-bootstrap';
3import NavbarBrand = require('./NavbarBrand');
4import NavbarCollapse = require('./NavbarCollapse');
5import NavbarHeader = require('./NavbarHeader');
6import NavbarToggle = require('./NavbarToggle');
7
8declare namespace Navbar {
9 export interface NavbarProps extends React.HTMLProps<Navbar> {
10 brand?: any; // TODO: Add more specific type
11 bsSize?: Sizes | undefined;
12 bsStyle?: string | undefined;
13 collapseOnSelect?: boolean | undefined;
14 componentClass?: React.ReactType | undefined;
15 defaultNavExpanded?: boolean | undefined;
16 fixedBottom?: boolean | undefined;
17 fixedTop?: boolean | undefined;
18 fluid?: boolean | undefined;
19 inverse?: boolean | undefined;
20 expanded?: boolean | undefined;
21 onToggle?: Function | undefined;
22 staticTop?: boolean | undefined;
23 toggleButton?: any; // TODO: Add more specific type
24 toggleNavKey?: string | number | undefined;
25 }
26}
27declare class Navbar extends React.Component<Navbar.NavbarProps> {
28 static Brand: typeof NavbarBrand;
29 static Collapse: typeof NavbarCollapse;
30 static Header: typeof NavbarHeader;
31 static Toggle: typeof NavbarToggle;
32 static Link: typeof NavbarLink;
33 static Text: typeof NavbarText;
34 static Form: typeof NavbarForm;
35}
36export = Navbar;
37
38/**
39 * the classes below aren't present in lib/
40 */
41
42interface NavbarLinkProps extends React.HTMLProps<NavbarLink> {
43 href: string;
44 onClick?: React.MouseEventHandler<any> | undefined;
45}
46declare class NavbarLink extends React.Component<NavbarLinkProps> { }
47
48interface NavbarTextProps extends React.HTMLProps<NavbarText> {
49 pullRight?: boolean | undefined;
50}
51declare class NavbarText extends React.Component<NavbarTextProps> { }
52
53interface NavbarFormProps extends React.HTMLProps<NavbarForm> {
54 componentClass?: React.ReactType | undefined;
55 pullRight?: boolean | undefined;
56 pullLeft?: boolean | undefined;
57}
58declare class NavbarForm extends React.Component<NavbarFormProps> { }