Skip to content
This repository has been archived by the owner on Nov 1, 2018. It is now read-only.

Added navbar package #4

Merged
merged 18 commits into from
Aug 18, 2017
Merged

Added navbar package #4

merged 18 commits into from
Aug 18, 2017

Conversation

Gejsi
Copy link
Contributor

@Gejsi Gejsi commented Aug 14, 2017

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

@lucat1 lucat1 self-requested a review August 14, 2017 21:23
@lucat1 lucat1 assigned lucat1 and Gejsi and unassigned lucat1 Aug 14, 2017
Copy link
Collaborator

@lucat1 lucat1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix please

{
"name": "@slup/navbar",
"version": "0.0.1",
"description": "Material design app bar",
Copy link
Collaborator

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

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)',
Copy link
Collaborator

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.


@bind
getStyles() {
const { backgroundColor, color } = this.props
Copy link
Collaborator

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

display: 'flex',
alignItems: 'center',
padding: '0 16px',
backgroundColor: backgroundColor,
Copy link
Collaborator

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

return styles
}

render({ children, backgroundColor, color }) {
Copy link
Collaborator

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>
Copy link
Collaborator

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>

Copy link
Collaborator

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.

@lucat1
Copy link
Collaborator

lucat1 commented Aug 18, 2017

LGTM👍🏻

@lucat1 lucat1 merged commit d2a0071 into master Aug 18, 2017
@lucat1 lucat1 deleted the add/navbar branch August 18, 2017 13:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants