mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -05:00
parent
11155c429e
commit
b15b5b8614
2 changed files with 12 additions and 1 deletions
|
@ -1,6 +1,8 @@
|
|||
var Formsy = require('formsy-react');
|
||||
var React = require('react');
|
||||
|
||||
require('./general-error.scss');
|
||||
|
||||
/*
|
||||
* A special formsy-react component that only outputs
|
||||
* error messages. If you want to display errors that
|
||||
|
@ -12,7 +14,7 @@ module.exports = Formsy.HOC(React.createClass({
|
|||
render: function () {
|
||||
if (!this.props.showError()) return null;
|
||||
return (
|
||||
<p className="error">
|
||||
<p className="general-error">
|
||||
{this.props.getErrorMessage()}
|
||||
</p>
|
||||
);
|
||||
|
|
9
src/components/forms/general-error.scss
Normal file
9
src/components/forms/general-error.scss
Normal file
|
@ -0,0 +1,9 @@
|
|||
@import "../../colors";
|
||||
|
||||
.general-error {
|
||||
border: 1px solid $active-gray;
|
||||
border-radius: 4px;
|
||||
background-color: $ui-orange;
|
||||
padding: 1rem;
|
||||
color: $type-white;
|
||||
}
|
Loading…
Reference in a new issue