Skip to content

Commit

Permalink
question styles 904
Browse files Browse the repository at this point in the history
  • Loading branch information
nickllerandi committed Jun 19, 2019
1 parent ff741af commit dc9407b
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 7 deletions.
34 changes: 34 additions & 0 deletions client/src/components/layout/Ads.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from 'react'
import styled from 'styled-components'

// UTILS
import {elevation, white} from '../../utils'


const Ads = () => {
return (
<AdsStyled>
<div className='Ad'>I'm an ad</div>
<div className='Ad'>I'm an ad</div>
<div className='Ad'>I'm an ad</div>
<div className='Ad'>I'm an ad</div>
<div className='Ad'>I'm an ad</div>
</AdsStyled>
)
}

const AdsStyled = styled.div`
/* background-color: yellowgreen; */
flex: 1;
display: flex;
flex-direction: column;
.Ad {
background-color: ${white};
${elevation[1]};
padding: 3rem;
margin-bottom: 3.5rem;
}
`

export default Ads
2 changes: 1 addition & 1 deletion client/src/components/questions/Answer.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Answer extends Component {
const {errors} = this.state;

return (
<div className="Answer">
<div className="Answer" style={{margin:'3.5rem 0'}}>
Answer this question
<form noValidate onSubmit={this.onSubmit}>
<input
Expand Down
5 changes: 3 additions & 2 deletions client/src/components/questions/AnswerFeed.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,14 @@ class AnswerFeed extends Component {

const AnswerFeedStyled = styled.div`
/* background-color: yellowgreen; */
flex: 1;
/* flex: 1; */
display: flex;
flex-direction: column;
margin-top: 3.5rem;
.Answer {
background-color: ${white};
${elevation[2]};
${elevation[1]};
padding: 3rem;
margin-bottom: 3.5rem;
Expand Down
11 changes: 7 additions & 4 deletions client/src/components/questions/Question.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import styled from 'styled-components'
// COMPONENTS
import Answer from "./Answer";
import AnswerFeed from "./AnswerFeed";
import Ads from '../layout/Ads'

// ACTIONS
import {getQuestion, deleteQuestion, likeQuestion, clearErrors} from "../../actions/questionActions";
Expand Down Expand Up @@ -105,9 +106,11 @@ class Question extends Component {
<hr/>

<Answer/>
<hr/>
<AnswerFeed/>
</div>

<AnswerFeed/>
<Ads/>
</DetailStyled>
</div>
)
Expand All @@ -122,15 +125,15 @@ const DetailStyled = styled.div`
.body {
background-color: ${white};
flex: 0 0 60%;
flex: 0 0 70%;
margin-right: 4.5rem;
${elevation[2]};
padding: 3rem;
&__question {
display: flex;
align-items: flex-start;
margin-bottom: 1rem;
margin-bottom: 3.5rem;
&-button {
Expand Down

0 comments on commit dc9407b

Please sign in to comment.