Skip to content
This repository was archived by the owner on Apr 5, 2020. It is now read-only.

Commit e9f7f58

Browse files
authored
Merge pull request #1 from joekrump/component-syntax-updates
Component syntax updates
2 parents 774e935 + 5224b27 commit e9f7f58

File tree

16 files changed

+225
-228
lines changed

16 files changed

+225
-228
lines changed

src/components/App.scss

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
@import "../variables.scss";
2+
13
.link {
24
&.light {
3-
color: #81D4FA; /* lightBlue200 */
5+
color: $darkPurple;
46
&:hover {
5-
color: #B3E5FC; /* lightBlue100 */
7+
color: $lightPurple;
68
}
79
}
810
&.dark {
9-
color: #3d5afe; /* indigoA200 */
11+
color: $lightBlue100;
1012
&:hover {
11-
color: #536DFE; /* indigoA400 */
13+
color: $lightBlue200;
1214
}
1315
}
1416
}

src/components/Layout/FrontendPage.scss

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
// Components/Layout/FrontendPage.scss
2-
//
3-
4-
$darkPurple: #3d5afe;
1+
@import "../../variables.scss";
52

63
.frontend-page-container {
74
padding-top: 56px;

src/components/Menu/SpeedDial.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$actionSpacing: 8px;
1+
@import "../../variables.scss";
22

33
.cover {
44
position: fixed;
@@ -52,7 +52,6 @@ $actionSpacing: 8px;
5252
height: 200px;
5353

5454
.action {
55-
// flex-direction: row-reverse;
5655
display: flex;
5756
height: 42px;
5857
padding: $actionSpacing 0;

src/components/Nav/AdminNav.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,10 @@ class AdminNav extends React.Component {
1717

1818
constructor(props) {
1919
super(props);
20-
21-
this.state = {
22-
menuOpen: true
23-
}
20+
this.state = { menuOpen: true };
2421
}
2522

26-
handleToggleMenu() {
23+
toggleMenu() {
2724
this.setState({
2825
menuOpen: !this.state.menuOpen
2926
});
@@ -37,21 +34,21 @@ class AdminNav extends React.Component {
3734
e.preventDefault();
3835
auth.logout(() => {
3936
// dispatch an action if the server has successfully logged out the user.
40-
this.props.logoutUser('/login');
37+
this.props.logoutUser("/login");
4138
}, () => {
4239
this.props.loginUser(auth.getUser(), auth.getToken(), true)
4340
}, this.props.dispatch);
4441
}
4542

4643
renderBackButton() {
47-
return (this.props.pluralName === '' || this.props.adminPageType === 'index') ? null
44+
return (this.props.pluralName === "" || this.props.adminPageType === 'index') ? null
4845
: <BackButton
4946
label={this.props.pluralName}
50-
link={'/admin/' + this.props.pluralName} />
47+
link={'/admin/' + this.props.pluralName}
48+
/>
5149
}
5250

5351
render() {
54-
5552
let iconElementRight = null;
5653

5754
if(this.props.loggedIn) {
@@ -74,7 +71,7 @@ class AdminNav extends React.Component {
7471
<Drawer
7572
open={this.state.menuOpen}
7673
docked={false}
77-
onRequestChange={() => this.handleToggleMenu()}
74+
onRequestChange={() => this.toggleMenu()}
7875
>
7976
<AdminMenu currentUser={this.props.user} routeOptions={AppConfig.routes.admin} />
8077
</Drawer>
@@ -86,7 +83,7 @@ class AdminNav extends React.Component {
8683
{this.renderBackButton()}
8784
</div>
8885
)}
89-
onLeftIconButtonTouchTap={() => this.handleToggleMenu()}
86+
onLeftIconButtonTouchTap={() => this.toggleMenu()}
9087
style={{ position: 'fixed' }}
9188
iconElementRight={iconElementRight}
9289
/>

src/components/Nav/Breadcrumb.scss

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
// components/Nav/Breadcumb.scss
2-
//
3-
$darkGrey: #424242;
4-
$lightPrimary: #aab7ff;
5-
$darkPrimary: #3d5afe;
1+
@import "../../variables.scss";
62

73
.breadcrumb-links {
8-
background-color: $darkGrey;
4+
background-color: $midGrey;
95
height: 30px;
106
margin-top: -1px;
117

src/components/Nav/SiteTopNav.scss

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
$darkPurple: #3d5afe;
2-
$linkColor: #e6e6e6;
1+
@import "../../variables.scss";
32

43
.top-nav {
54
position: fixed;
65
height: 56px;
76
width: 100%;
8-
background-color: #212121;
7+
background-color: $darkGrey;
98
z-index: 100;
109
margin: 0;
1110
padding: 0;
@@ -38,12 +37,12 @@ $linkColor: #e6e6e6;
3837
font-weight: 300;
3938
max-width: 140px;
4039
text-decoration: none;
41-
padding: 0 0.5rem 2px 0.5rem;
40+
padding: 14px 0.5rem 14px 0.5rem;
4241

4342
&.active, &:hover, &:focus {
4443
color: #fff;
4544
padding-bottom: 0;
46-
border-bottom: 2px solid $darkPurple;
45+
border-bottom: 2px solid $darkPrimary;
4746
}
4847
}
4948
}
@@ -58,7 +57,7 @@ $linkColor: #e6e6e6;
5857
font-weight: 300;
5958
color: $linkColor;
6059
&:hover, &:focus {
61-
color: $darkPurple;
60+
color: $darkPrimary;
6261
}
6362
}
6463
}

src/components/Pages/Card/Card.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@import "../../../variables.scss";
2+
13
.admin-container {
24
display: flex;
35
align-items: center;
@@ -12,7 +14,7 @@
1214

1315
&.basic {
1416
.front, .back {
15-
border: 2px solid #e6e6e6;
17+
border: 2px solid $linkColor;
1618
background: #252429;
1719
}
1820
}

0 commit comments

Comments
 (0)