Skip to content

Commit b86231d

Browse files
authored
docs: removed search and added notes for BS 4 (react-bootstrap#3655)
* docs: removed search and added notes for BS 4 * Update www/src/components/NavMain.js Co-Authored-By: mxschmitt <max@schmitt.mx> * fix: twitter iframe
1 parent 2b2a551 commit b86231d

File tree

3 files changed

+13
-23
lines changed

3 files changed

+13
-23
lines changed

www/src/components/NavMain.js

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import Link from 'gatsby-link';
55
import Navbar from 'react-bootstrap/lib/Navbar';
66
import Nav from 'react-bootstrap/lib/Nav';
77
import NavItem from 'react-bootstrap/lib/NavItem';
8-
import FormControl from 'react-bootstrap/lib/FormControl';
8+
import MenuItem from 'react-bootstrap/lib/MenuItem';
9+
import NavDropdown from 'react-bootstrap/lib/NavDropdown';
910

1011
import config from '../config';
1112

@@ -28,15 +29,6 @@ const propTypes = {
2829
activePage: PropTypes.string
2930
};
3031

31-
function attachSearch(ref) {
32-
if (ref && window.docsearch)
33-
window.docsearch({
34-
apiKey: '68117ff90f086cb491d7e7e984cd7b75',
35-
indexName: 'react_bootstrap',
36-
inputSelector: `#${ref.id}`,
37-
debug: false // Set debug to true if you want to inspect the dropdown
38-
});
39-
}
4032
function NavMain({ activePage }) {
4133
return (
4234
<Navbar
@@ -73,19 +65,10 @@ function NavMain({ activePage }) {
7365
</Wrapper>
7466
</Nav>
7567

76-
<Navbar.Form pullRight>
77-
<FormControl
78-
type="search"
79-
id="docs-search-input"
80-
className="bs-search-bar"
81-
placeholder="Search…"
82-
inputRef={attachSearch}
83-
/>
84-
</Navbar.Form>
8568
<Nav pullRight>
86-
<NavItem href="https://github.com/react-bootstrap/react-bootstrap/releases">
87-
v{config.version}
88-
</NavItem>
69+
<NavDropdown title={`v${config.version}`} id="version-dropdown">
70+
<MenuItem href="https://react-bootstrap.netlify.com">React-Bootstrap for Bootstrap 4</MenuItem>
71+
</NavDropdown>
8972
<NavItem href="https://getbootstrap.com/docs/3.3/css/">
9073
Supports Bootstrap v{config.bootstrapVersion}
9174
</NavItem>

www/src/components/PageFooter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class PageFooter extends React.Component {
3535
<li>
3636
<iframe
3737
src="https://platform.twitter.com/widgets/follow_button.html?screen_name=react_bootstrap&show_screen_name=true"
38-
width={230}
38+
width={235}
3939
height={20}
4040
title="twitter"
4141
allowTransparency="true"

www/src/pages/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import React from 'react';
22

3+
import Button from 'react-bootstrap/lib/Button'
4+
35
export default class HomePage extends React.Component {
46
render() {
57
return (
@@ -9,6 +11,11 @@ export default class HomePage extends React.Component {
911
<p className="lead">
1012
The most popular front-end framework, rebuilt for React.
1113
</p>
14+
<Button>
15+
<a href="/components/alerts/">
16+
Discover Components
17+
</a>
18+
</Button>
1219
</div>
1320
</main>
1421
);

0 commit comments

Comments
 (0)