diff --git a/src/less/nav-bar.less b/src/less/nav-bar.less
index 5f2e91ad4..9c917fe1d 100644
--- a/src/less/nav-bar.less
+++ b/src/less/nav-bar.less
@@ -43,4 +43,13 @@
transform: translate(0, -100%);
box-shadow: @shadow-none;
}
+
+ &.dark {
+ background-color: @tertiary;
+ color: @white;
+ }
+
+ &.light {
+ background-color: @white;
+ }
}
diff --git a/src/ts/components/navigation/nav-bar.examples.md b/src/ts/components/navigation/nav-bar.examples.md
index c7d2dce96..f4b1e08d2 100644
--- a/src/ts/components/navigation/nav-bar.examples.md
+++ b/src/ts/components/navigation/nav-bar.examples.md
@@ -17,6 +17,37 @@ class NavBarExample extends React.Component {
return (
+
+
+
+ Title
+
+
+
+
+
+
diff --git a/src/ts/components/navigation/nav-bar.tsx b/src/ts/components/navigation/nav-bar.tsx
index 363bde0b5..dd5a146de 100644
--- a/src/ts/components/navigation/nav-bar.tsx
+++ b/src/ts/components/navigation/nav-bar.tsx
@@ -19,6 +19,8 @@ export interface NavBarProps extends ComponentProps, HTMLProps {
* Remove NavBar shadow
*/
noShadow?: boolean;
+ dark?: boolean;
+ light?: boolean;
}
export interface NavBarState {
@@ -74,6 +76,8 @@ export class NavBar extends PureComponent {
className,
fixed,
shy,
+ dark,
+ light,
noShadow,
component: Component = 'div',
...remainingProps
@@ -87,6 +91,8 @@ export class NavBar extends PureComponent {
shy ? 'shy' : null,
hidden ? 'hidden' : null,
noShadow ? 'no-shadow' : null,
+ dark ? 'dark' : null,
+ light ? 'light' : null,
className,
];
diff --git a/tests/__snapshots__/nav-bar.tsx.snap b/tests/__snapshots__/nav-bar.tsx.snap
index 2c482f333..ab6370df0 100644
--- a/tests/__snapshots__/nav-bar.tsx.snap
+++ b/tests/__snapshots__/nav-bar.tsx.snap
@@ -18,6 +18,12 @@ exports[`NavBar should apply shy class 1`] = `
/>
`;
+exports[`NavBar should apply the dark class 1`] = `
+
+`;
+
exports[`NavBar should apply the hidden class 1`] = `
`;
+exports[`NavBar should apply the light class 1`] = `
+
+`;
+
exports[`NavBar should match snapshot 1`] = `
{
expect(tree).toMatchSnapshot();
});
+ it('should apply the dark class', () => {
+ const tree = renderer.create();
+
+ expect(tree).toMatchSnapshot();
+ });
+
+ it('should apply the light class', () => {
+ const tree = renderer.create();
+
+ expect(tree).toMatchSnapshot();
+ });
+
it('should apply the hidden class', () => {
const instance = enzyme.mount();