-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix please
packages/Navbar/package.json
Outdated
{ | ||
"name": "@slup/navbar", | ||
"version": "0.0.1", | ||
"description": "Material design app bar", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use nav bar instead for consistency
packages/Navbar/src/index.js
Outdated
const { backgroundColor, color } = this.props | ||
|
||
const styles = { | ||
boxShadow: '0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12)', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a template litteral and add some new lines for each scope of the shadow.
packages/Navbar/src/index.js
Outdated
|
||
@bind | ||
getStyles() { | ||
const { backgroundColor, color } = this.props |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use just background, not backgroundColor, for both consistency, simplicity and convention
packages/Navbar/src/index.js
Outdated
display: 'flex', | ||
alignItems: 'center', | ||
padding: '0 16px', | ||
backgroundColor: backgroundColor, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix accordingly to what said before
packages/Navbar/src/index.js
Outdated
return styles | ||
} | ||
|
||
render({ children, backgroundColor, color }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you import backgroundColor and color when you dont use them?
src/index.js
Outdated
@@ -20,6 +21,9 @@ class Tester extends Component { | |||
return( | |||
<section> | |||
|
|||
<Navbar backgroundColor='teal' color='red'>Text</Navbar> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix accordingly to what said before.
@@ -20,6 +21,9 @@ class Tester extends Component { | |||
return( | |||
<section> | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a {/* Navbar demo */}
for consistency.
Now the position of the navbar can be modified
LGTM👍🏻 |
Introducing Navbar component 🚀
The Navbar is used for branding, navigation, search and actions
TODOS: 📝
Change the position of the navbar for a different scrolling technique
Change the height of the navbar on scroll