Skip to content

Commit

Permalink
Merge pull request #27 from oslabs-beta/josh/actionstyle
Browse files Browse the repository at this point in the history
applied style to action container
  • Loading branch information
mylee1995 committed Jul 27, 2019
2 parents ec1f1f9 + f1ffa0a commit fae06b2
Show file tree
Hide file tree
Showing 11 changed files with 123 additions and 45 deletions.
7 changes: 5 additions & 2 deletions src/app/components/Action.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ const Action = (props) => {
}}
>
<div className="action-component-text">{index}</div>
<button onClick={() => handleSendSnapshot(index)}>Jump</button>
<div className="jump-button" onClick={() => handleSendSnapshot(index)}>
Jump
</div>
</div>
);
};

Action.propTypes = {
// snapshot: PropTypes.object,
selected: PropTypes.bool,
index: PropTypes.number,
};

export default Action;
9 changes: 6 additions & 3 deletions src/app/containers/ActionContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ class ActionContainer extends Component {
}
return (
<div className="action-container">
<button className="emptySnapshot" onClick = {this.props.emptySnapshot}>emptySnapshot</button>
<div >{actionsArr}</div>
<div className="action-component">
<div className="empty-button" onClick={this.props.emptySnapshot}>
emptySnapshot
</div>
</div>
<div>{actionsArr}</div>
</div>
);

}
}

Expand Down
1 change: 0 additions & 1 deletion src/app/containers/MainContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ class MainContainer extends Component {

return (
<div className="main-container">
main-conatiner
<HeadContainer />
<div className="body-container">
<ActionContainer
Expand Down
26 changes: 26 additions & 0 deletions src/app/styles/abstracts/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/// fontFamily: 'monaco, Consolas, Lucida Console, monospace'
/// @type List
$text-font-stack: monaco, Consolas, 'Lucida Console', monospace, Arial,
sans-serif !default;

/// @type Color
$text-color: rgb(231, 231, 231);

/// @type Color
$brand-color: #2a2f3a !default;

/// Light grey
/// @type Color
$light-grey-one: #474c55 !default;

/// @type Color
$light-grey-two: #5f6369 !default;

/// @type Color
$border-color: rgba(190, 190, 190, 0.5) !default;

/// @type Color
$highlight-color: rgba(224, 224, 224, 0.5) !default;

/// @type Font Size
$button-text-size: 10px;
5 changes: 5 additions & 0 deletions src/app/styles/base/_typography.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
body {
color: $text-color;
font: normal 13px $text-font-stack;
// font: normal 125% / 1.4 $text-font-stack;
}
22 changes: 22 additions & 0 deletions src/app/styles/components/_actionComponent.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.action-component {
padding: 5px 10px;
display: flex;
justify-content: space-around;
align-items: center;
height: 20px;
background-color: $brand-color;
border-bottom-style: solid;
border-bottom-width: 1px;
border-color: $border-color;
cursor: pointer;
text-overflow: ellipsis;
}

.action-component.selected {
background-color: $light-grey-one;
}

.action-component button {
position: relative;
right: 0px;
}
Empty file.
30 changes: 30 additions & 0 deletions src/app/styles/components/_buttons.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.empty-button {
@extend %button-shared;
width: 120px;
}

.jump-button {
@extend %button-shared;
width: 50px;
}

.jump-button:hover {
background-color: $highlight-color;
}

.empty-button:hover {
background-color: $highlight-color;
}

%button-shared {
display: flex;
justify-content: center;
align-items: center;
height: 20px;
border-style: solid;
border-width: 1px;
border-radius: 3px;
cursor: pointer;
font-size: $button-text-size;
line-height: 1.5em;
}
6 changes: 6 additions & 0 deletions src/app/styles/layout/_actionContainer.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.action-container {
flex: 3 auto;
height: 100%;
overflow: scroll;
background-color: $brand-color;
}
15 changes: 15 additions & 0 deletions src/app/styles/main.scss
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
@charset 'UTF-8';

// 1. Configuration and helpers
@import 'abstracts/variables';

// 3. Base stuff
@import 'base/base', 'base/fonts', 'base/helpers', 'base/typography';

// 4. Layout-related sections
@import 'layout/actionContainer';

// 5. Components
@import 'components/buttons', 'components/actionComponent';

// other styles that needs to be modularized
@import 'styles';
47 changes: 8 additions & 39 deletions src/app/styles/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,36 @@
height: 100%;
margin: 0;
padding: 0;
background-color: rgb(238, 238, 238);
background-color: $brand-color;
}

.head-container {
height: 10%;
height: 5%;
}

.body-container {
height: 80%;
height: 75%;
width: 100%;
display: flex;
flex-wrap: wrap;
}

.action-container {
flex: 3 auto;
height: 100%;
overflow: scroll;
}

.emptySnapshot{
width: 100%;
}

.state-container {
font-size: 15px;
flex: 7 auto;
flex: 6 auto;
height: 100%;
overflow: scroll;
background-color: rgb(0, 43, 54);
background-color: $brand-color;
}

/* if extension width is less than 500px, stack the body containers */
// this is not working for some reason
@media (max-width: 500px) {
.body-container {
flex-direction: column;
}
.state-container {
flex: 3 auto;
// flex: 5 auto;
}
}

Expand All @@ -58,28 +49,6 @@
.state-container,
.travel-container {
border-style: solid;
border-color: black;
border-width: thin;
}

.action-component {
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
height: 40px;
width: 100%;
background-color: rgb(170, 170, 170);
border-style: solid;
border-color: $border-color;
border-width: thin;
cursor: pointer;
}

.action-component.selected {
background-color: rgb(134, 134, 134);
}

.action-component button {
position: relative;
right: 0px;
}

0 comments on commit fae06b2

Please sign in to comment.