UNPKG

1.87 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;
12 bsStyle?: string;
13 collapseOnSelect?: boolean;
14 componentClass?: React.ReactType;
15 defaultNavExpanded?: boolean;
16 fixedBottom?: boolean;
17 fixedTop?: boolean;
18 fluid?: boolean;
19 inverse?: boolean;
20 expanded?: boolean;
21 onToggle?: Function;
22 staticTop?: boolean;
23 toggleButton?: any; // TODO: Add more specific type
24 toggleNavKey?: string | number;
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>;
45}
46declare class NavbarLink extends React.Component<NavbarLinkProps> { }
47
48interface NavbarTextProps extends React.HTMLProps<NavbarText> {
49 pullRight?: boolean;
50}
51declare class NavbarText extends React.Component<NavbarTextProps> { }
52
53interface NavbarFormProps extends React.HTMLProps<NavbarForm> {
54 componentClass?: React.ReactType;
55 pullRight?: boolean;
56 pullLeft?: boolean;
57}
58declare class NavbarForm extends React.Component<NavbarFormProps> { }