-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename
<ScrollableNavBar />
to <HorizontalOverflowBar />
- Renames component to be more descriptive of it's output - Creates `/navigation` directory for additional navigation patterns
- Loading branch information
Richard Palmer
committed
Mar 13, 2017
1 parent
66e8297
commit b055b77
Showing
5 changed files
with
125 additions
and
111 deletions.
There are no files selected for viewing
100 changes: 100 additions & 0 deletions
100
components/Navigation/HorizontalOverflowBar/HorizontalOverflowBar.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
.root { | ||
position: relative; | ||
} | ||
|
||
.root:before, | ||
.root:after { | ||
content: ''; | ||
height: 100%; | ||
width: 7.8125rem; | ||
position: absolute; | ||
top: 0; | ||
pointer-events: none; | ||
} | ||
|
||
.root:before { | ||
left: calc(-1 * var(--size-small)); | ||
right: auto; | ||
background: linear-gradient(to left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.75) 100%); | ||
} | ||
|
||
.root:after { | ||
right: calc(-1 * var(--size-small)); | ||
left: auto; | ||
background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.75) 100%); | ||
} | ||
|
||
.left:before { | ||
content: none; | ||
} | ||
|
||
.right:after { | ||
content: none; | ||
} | ||
|
||
.listWrapper { | ||
max-width: 38.25rem; | ||
width: 100%; | ||
overflow-y: hidden; | ||
overflow-x: scroll; | ||
-webkit-overflow-scrolling: touch; | ||
} | ||
|
||
.list { | ||
list-style-type: none; | ||
width: 56.25rem; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
.item { | ||
display: block; | ||
float: left; | ||
width: auto; | ||
} | ||
|
||
.link { | ||
display: block; | ||
composes: fontSmallI from '../../../globals/typography.css'; | ||
font-weight: var(--fontweight-demi); | ||
text-transform: uppercase; | ||
color: var(--color-greyLight); | ||
text-decoration: none; | ||
padding: var(--size-medium) var(--size-small); | ||
} | ||
|
||
.link:hover { | ||
color: var(--color-greyDarker); | ||
} | ||
|
||
.activeLink { | ||
color: var(--color-greyDarker); | ||
} | ||
|
||
.centered .listWrapper { | ||
max-width: 100%; | ||
padding-left: 0; | ||
padding-right: 0; | ||
text-align: center; | ||
overflow-x: hidden; | ||
} | ||
|
||
.centered .list { | ||
list-style-type: none; | ||
width: auto; | ||
} | ||
|
||
.centered .item { | ||
display: inline-block; | ||
float: none; | ||
width: auto; | ||
} | ||
|
||
.centered .item a { | ||
padding-left: 0; | ||
padding-right: 0; | ||
} | ||
|
||
.centered .item + .item { | ||
margin-left: var(--space-96); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
components/Navigation/HorizontalOverflowBar/HorizontalOverflowBar.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from 'react'; | ||
import { render } from 'react-dom'; | ||
|
||
import HorizontalOverflowBar from './HorizontalOverflowBar'; | ||
|
||
it('renders without crashing', () => { | ||
const div = document.createElement('div'); | ||
render( | ||
<HorizontalOverflowBar> | ||
{ link => link({ key: 1 }) } | ||
</HorizontalOverflowBar>, | ||
div | ||
); | ||
}); |
This file was deleted.
Oops, something went wrong.