Skip to content

Commit 467c4d4

Browse files
authored
Allow links to be left-aligned in NavbarSimple (#618)
1 parent 77b862f commit 467c4d4

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/components/nav/NavbarSimple.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const NavbarSimple = props => {
1919
brand_href,
2020
brand_style,
2121
brand_external_link,
22-
linksLeft,
22+
links_left,
2323
fluid,
2424
color,
2525
style,
@@ -53,7 +53,7 @@ const NavbarSimple = props => {
5353
)}
5454
<NavbarToggler onClick={toggle} />
5555
<Collapse isOpen={navbarOpen} navbar>
56-
<Nav className={linksLeft ? 'mr-auto' : 'ml-auto'} navbar>
56+
<Nav className={links_left ? 'mr-auto' : 'ml-auto'} navbar>
5757
{children}
5858
</Nav>
5959
</Collapse>
@@ -66,7 +66,8 @@ NavbarSimple.defaultProps = {
6666
fluid: false,
6767
color: 'light',
6868
light: true,
69-
expand: 'md'
69+
expand: 'md',
70+
links_left: false,
7071
};
7172

7273
NavbarSimple.propTypes = {
@@ -131,6 +132,11 @@ NavbarSimple.propTypes = {
131132
*/
132133
fluid: PropTypes.bool,
133134

135+
/**
136+
* Align the navlinks in the navbar to the left. Default: False.
137+
*/
138+
links_left: PropTypes.bool,
139+
134140
/**
135141
* Applies the `navbar-light` class to the NavbarSimple, causing text in the
136142
* children of the Navbar to use dark colors for contrast / visibility.

0 commit comments

Comments
 (0)