mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-11-30 02:01:46 +00:00
Merge pull request #12654 from patsissons/react-bootstrap/navbar-form
Adding Navbar.Form
This commit is contained in:
Vendored
+9
@@ -535,6 +535,14 @@ declare namespace ReactBootstrap {
|
||||
type NavbarText = React.ClassicComponent<NavbarTextProps, {}>;
|
||||
const NavbarText: React.ClassicComponentClass<NavbarTextProps>;
|
||||
|
||||
// <Navbar.Form />
|
||||
interface NavbarFormProps extends React.HTMLProps<NavbarForm> {
|
||||
componentClass?: React.ReactType;
|
||||
pullRight?: boolean;
|
||||
}
|
||||
type NavbarForm = React.ClassicComponent<NavbarFormProps, {}>;
|
||||
const NavbarForm: React.ClassicComponentClass<NavbarFormProps>;
|
||||
|
||||
// <Navbar />
|
||||
interface NavbarProps extends React.HTMLProps<Navbar> {
|
||||
brand?: any; // TODO: Add more specific type
|
||||
@@ -560,6 +568,7 @@ declare namespace ReactBootstrap {
|
||||
Toggle: typeof NavbarToggle;
|
||||
Link: typeof NavbarLink;
|
||||
Text: typeof NavbarText;
|
||||
Form: typeof NavbarForm;
|
||||
}
|
||||
type Navbar = React.ClassicComponent<NavbarProps, {}>;
|
||||
var Navbar: NavbarClass;
|
||||
|
||||
@@ -545,6 +545,13 @@ export class ReactBootstrapTest extends Component<any, any> {
|
||||
<Navbar.Text>
|
||||
Signed in as: <Navbar.Link href="#">Mark Otto</Navbar.Link>
|
||||
</Navbar.Text>
|
||||
<Navbar.Form pullRight>
|
||||
<FormGroup>
|
||||
<FormControl type='text' placeholder='Search' />
|
||||
</FormGroup>
|
||||
{' '}
|
||||
<Button type='submit'>Submit</Button>
|
||||
</Navbar.Form>
|
||||
<Navbar.Text pullRight>
|
||||
Have a great day!
|
||||
</Navbar.Text>
|
||||
|
||||
Reference in New Issue
Block a user