Skip to content

Commit

Permalink
[cw|#63] allow multiline poet descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
connorwalsh committed Dec 26, 2018
1 parent 47bda4a commit 2c1afad
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
17 changes: 11 additions & 6 deletions client/src/components/dashboard/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
}

.profile-user-details-field {
color: pink;
color: #ff87c9;
}

.profile-user-details-value {
color: pink;
color: #ff87c9;
}

.profile-user-details-divider {
Expand All @@ -57,14 +57,14 @@
width: 100%;
justify-content: space-between;
align-items: center;
border: 4px solid pink;
border: 4px solid #ffa9d8;
}

.profile-poets-list-header-container {
display: flex;
align-items: center;
align-self: stretch;
background-color: pink;
background-color: #ffa9d8;
}

.profile-poets-list-header {
Expand Down Expand Up @@ -173,15 +173,15 @@
width: 80%;
justify-content: space-between;
align-items: center;
border: 4px solid #b2ffb2;
border: 4px solid #b2f6ff;
margin-top: 6em;
}

.create-poet-form-header-container {
display: flex;
align-items: center;
align-self: stretch;
background-color: #b2ffb2;
background-color: #b2f6ff;
}

.create-poet-form-header {
Expand Down Expand Up @@ -268,19 +268,24 @@
.profile-poet-upload-error-message {
color: #ff7792;
margin-top: 2em;
border-left: 2px solid #ff7792;
}

::-webkit-input-placeholder { /* Chrome/Opera/Safari */
color: #c3a5d3;
overflow: hidden;
}
::-moz-placeholder { /* Firefox 19+ */
color: #c3a5d3;
overflow: hidden;
}
:-ms-input-placeholder { /* IE 10+ */
color: #c3a5d3;
overflow: hidden;
}
:-moz-placeholder { /* Firefox 18- */
color: #c3a5d3;
overflow: hidden;
}


Expand Down
7 changes: 4 additions & 3 deletions client/src/components/dashboard/poet.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,15 @@ export class PoetSummary extends Component {
}
}

const renderTextField = ({input, label, meta: {touched, error}, ...custom}) => (
const renderTextField = multiline => ({input, label, meta: {touched, error}, ...custom}) => (
<TextField
hintText={label}
floatingLabelText={label}
hintStyle={{color: '#f28cce', fontSize: '1.5em'}}
inputStyle={{color: '#f28cce', fontSize: '1.5em'}}
underlineStyle={{borderColor: '#19ecff'}}
underlineFocusStyle={{borderColor: '#f28cce'}}
multiLine={multiline}
errorText={touched && error}
{...input}
{...custom}
Expand Down Expand Up @@ -198,10 +199,10 @@ export class createPoetForm extends Component {
<div className='create-poet-form-and-error'>
<form className='create-poet-form' onSubmit={handleSubmit}>
<div>
<Field name='name' component={renderTextField} type='text' placeholder='name'/>
<Field name='name' component={renderTextField(false)} type='text' spellcheck='false' placeholder='name'/>
</div>
<div styles={{marginTop: '1.5em'}}>
<Field name='description' component={renderTextField} type='text' placeholder='description'/>
<Field name='description' component={renderTextField(true)} type='text' placeholder='description'/>
</div>
<div className='create-poet-form-language-select'>
<Field name='language' component={renderSelectField} label='language'>
Expand Down

0 comments on commit 2c1afad

Please sign in to comment.