Fix editor bugs after refactor (#812)

* Add invalid class only when invalid prop is passed

* adjust css to fix overflow bug in app-js
This commit is contained in:
Stefanie Doll 2019-03-13 12:02:16 +01:00 committed by GitHub
parent c37f2fe018
commit d1fe487392
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View File

@ -71,7 +71,7 @@ export default class Editor extends React.Component<Props> {
return (
<div
id={this.id}
className={classes('ui-app-editor', className, !isValid ? 'invalid' : '')}
className={classes('ui-app-editor', className, isValid === false ? 'invalid' : '')}
/>
);
}

View File

@ -1,13 +1,13 @@
.ui-app-editor {
border: 1px solid rgba(34,36,38,.15);
&.invalid {
background-color: #fff6f6;
border-color: #e0b4b4;
}
.codeflask {
border: 1px solid rgba(34,36,38,.15);
background: transparent;
}
&.invalid {
.codeflask {
background-color: #fff6f6;
border-color: #e0b4b4;
}
}
}