Skip to content

Commit fae06b2

Browse files
authored
Merge pull request #27 from oslabs-beta/josh/actionstyle
applied style to action container
2 parents ec1f1f9 + f1ffa0a commit fae06b2

File tree

11 files changed

+123
-45
lines changed

11 files changed

+123
-45
lines changed

src/app/components/Action.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,16 @@ const Action = (props) => {
1313
}}
1414
>
1515
<div className="action-component-text">{index}</div>
16-
<button onClick={() => handleSendSnapshot(index)}>Jump</button>
16+
<div className="jump-button" onClick={() => handleSendSnapshot(index)}>
17+
Jump
18+
</div>
1719
</div>
1820
);
1921
};
2022

2123
Action.propTypes = {
22-
// snapshot: PropTypes.object,
24+
selected: PropTypes.bool,
25+
index: PropTypes.number,
2326
};
2427

2528
export default Action;

src/app/containers/ActionContainer.jsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ class ActionContainer extends Component {
2828
}
2929
return (
3030
<div className="action-container">
31-
<button className="emptySnapshot" onClick = {this.props.emptySnapshot}>emptySnapshot</button>
32-
<div >{actionsArr}</div>
31+
<div className="action-component">
32+
<div className="empty-button" onClick={this.props.emptySnapshot}>
33+
emptySnapshot
34+
</div>
35+
</div>
36+
<div>{actionsArr}</div>
3337
</div>
3438
);
35-
3639
}
3740
}
3841

src/app/containers/MainContainer.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ class MainContainer extends Component {
9191

9292
return (
9393
<div className="main-container">
94-
main-conatiner
9594
<HeadContainer />
9695
<div className="body-container">
9796
<ActionContainer
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/// fontFamily: 'monaco, Consolas, Lucida Console, monospace'
2+
/// @type List
3+
$text-font-stack: monaco, Consolas, 'Lucida Console', monospace, Arial,
4+
sans-serif !default;
5+
6+
/// @type Color
7+
$text-color: rgb(231, 231, 231);
8+
9+
/// @type Color
10+
$brand-color: #2a2f3a !default;
11+
12+
/// Light grey
13+
/// @type Color
14+
$light-grey-one: #474c55 !default;
15+
16+
/// @type Color
17+
$light-grey-two: #5f6369 !default;
18+
19+
/// @type Color
20+
$border-color: rgba(190, 190, 190, 0.5) !default;
21+
22+
/// @type Color
23+
$highlight-color: rgba(224, 224, 224, 0.5) !default;
24+
25+
/// @type Font Size
26+
$button-text-size: 10px;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
body {
2+
color: $text-color;
3+
font: normal 13px $text-font-stack;
4+
// font: normal 125% / 1.4 $text-font-stack;
5+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.action-component {
2+
padding: 5px 10px;
3+
display: flex;
4+
justify-content: space-around;
5+
align-items: center;
6+
height: 20px;
7+
background-color: $brand-color;
8+
border-bottom-style: solid;
9+
border-bottom-width: 1px;
10+
border-color: $border-color;
11+
cursor: pointer;
12+
text-overflow: ellipsis;
13+
}
14+
15+
.action-component.selected {
16+
background-color: $light-grey-one;
17+
}
18+
19+
.action-component button {
20+
position: relative;
21+
right: 0px;
22+
}

src/app/styles/components/_button.scss

Whitespace-only changes.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.empty-button {
2+
@extend %button-shared;
3+
width: 120px;
4+
}
5+
6+
.jump-button {
7+
@extend %button-shared;
8+
width: 50px;
9+
}
10+
11+
.jump-button:hover {
12+
background-color: $highlight-color;
13+
}
14+
15+
.empty-button:hover {
16+
background-color: $highlight-color;
17+
}
18+
19+
%button-shared {
20+
display: flex;
21+
justify-content: center;
22+
align-items: center;
23+
height: 20px;
24+
border-style: solid;
25+
border-width: 1px;
26+
border-radius: 3px;
27+
cursor: pointer;
28+
font-size: $button-text-size;
29+
line-height: 1.5em;
30+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.action-container {
2+
flex: 3 auto;
3+
height: 100%;
4+
overflow: scroll;
5+
background-color: $brand-color;
6+
}

src/app/styles/main.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,16 @@
1+
@charset 'UTF-8';
2+
3+
// 1. Configuration and helpers
4+
@import 'abstracts/variables';
5+
6+
// 3. Base stuff
7+
@import 'base/base', 'base/fonts', 'base/helpers', 'base/typography';
8+
9+
// 4. Layout-related sections
10+
@import 'layout/actionContainer';
11+
12+
// 5. Components
13+
@import 'components/buttons', 'components/actionComponent';
14+
15+
// other styles that needs to be modularized
116
@import 'styles';

0 commit comments

Comments
 (0)