Merge pull request #12654 from patsissons/react-bootstrap/navbar-form

Adding Navbar.Form
This commit is contained in:
Nathan Shively-Sanders
2016-11-22 13:05:13 -08:00
committed by GitHub
2 changed files with 16 additions and 0 deletions
+9
View File
@@ -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>