Merge pull request #1137 from metamaps/feature/improve.desc

make desc edit area larger and resizable
This commit is contained in:
Connor Turland 2017-09-17 16:25:53 -04:00 committed by GitHub
commit 1ffc513617
2 changed files with 5 additions and 8 deletions

View file

@ -139,14 +139,12 @@ $mid-gray-opacity: rgba(66, 66, 66, 0.6);
font-family: helvetica, sans-serif; font-family: helvetica, sans-serif;
color: #424242; color: #424242;
padding: 0; padding: 0;
width: 100%; width: 258px;
margin: 0; margin: 0;
border: 0; border: 0;
outline: none; outline: none;
font-size: 12px;
line-height: 15px;
background: none; background: none;
resize: none; overflow-y: scroll;
} }
/* /*
@ -180,11 +178,9 @@ $mid-gray-opacity: rgba(66, 66, 66, 0.6);
.CardOnGraph .riek_desc { .CardOnGraph .riek_desc {
display:block; display:block;
margin-top:2px; padding-right: 26px;
padding-right: 18px;
margin-right: 8px;
} }
.canEdit .CardOnGraph .riek_desc:hover { .canEdit .CardOnGraph .riek_desc:not(.riek-editing):hover {
background-image: url(<%= asset_data_uri('edit.png') %>); background-image: url(<%= asset_data_uri('edit.png') %>);
background-position: top right; background-position: top right;
background-repeat: no-repeat; background-repeat: no-repeat;

View file

@ -38,6 +38,7 @@ class Desc extends Component {
change={this.props.onChange} change={this.props.onChange}
className="riek_desc" className="riek_desc"
classEditing="riek-editing" classEditing="riek-editing"
rows="6"
editProps={{ editProps={{
onKeyPress: e => { onKeyPress: e => {
const ENTER = 13 const ENTER = 13