Skip to content

Commit

Permalink
Setup-styled-components#74
Browse files Browse the repository at this point in the history
  • Loading branch information
nickllerandi committed Apr 27, 2019
1 parent f6be57b commit a571a13
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
1 change: 0 additions & 1 deletion client/src/components/homepage/Homepage.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class Homepage extends Component {

render() {
const {questions} = this.props.questionReducer;
const {name} = this.props.authReducer.user;

return (
<div className="Landing">
Expand Down
9 changes: 6 additions & 3 deletions client/src/components/layout/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {clearCurrentProfile} from "../../actions/profileActions";

import fsmLogo from '../../img/fsm-green2.png'
import {lightblack, green, elevation, fixed} from '../../utils'
import {Button} from '../../elements'

class Navbar extends Component {
onLogoutClick = (e) => {
Expand All @@ -25,9 +26,11 @@ class Navbar extends Component {
<li>
<Link to="/login">Login</Link>
</li>
<li>
<Link to="/register">Sign up</Link>
</li>
<Link to="/register">
<Button.SignUp>
Sign Up
</Button.SignUp>
</Link>
</ul>
);

Expand Down
12 changes: 8 additions & 4 deletions client/src/elements/Buttons.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from 'styled-components'
import {darken} from 'polished'
import {blue, elevation} from '../utils'
import {blue, green, elevation} from '../utils'

export const Button = styled.button`
padding: 5px 20px;
Expand All @@ -17,8 +17,12 @@ export const Button = styled.button`
${elevation[2]};
background: ${darken(0.2, blue)};
}
&:focus {outline:0;}
`;

const SignUpButton = styled(Button)`
background: ${green};
`;

export const CancelButton = styled(Button)`
background: tomato;
`;
Button.SignUp = SignUpButton;
10 changes: 5 additions & 5 deletions client/src/elements/Cards.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import styled from 'styled-components'
import {black, lighterblack, blue, lightblue} from '../utils'
import {black, lighterblack, blue} from '../utils'

export const Card = styled.div`
padding: 12px 8px;
border-bottom: 1px solid ${lighterblack};
a:hover {
color: ${blue}
}
a {
text-decoration: none;
color: ${black};
}
a:hover {
color: ${blue}
}
`;

0 comments on commit a571a13

Please sign in to comment.