Commit d8e07ee7 authored by Matthew Taylor's avatar Matthew Taylor

use `rowClassName` instead

so that it can include `label`. Also add some default styling to `label` in `.row`. Thanks @rschamp!
parent 263d292b
...@@ -58,6 +58,13 @@ ...@@ -58,6 +58,13 @@
} }
} }
.checkbox-row,
.textarea-row {
.validation-message {
transform: translate(20rem, 0);
}
}
.form { .form {
position: relative; position: relative;
padding: 3rem 4rem; padding: 3rem 4rem;
...@@ -66,7 +73,7 @@ ...@@ -66,7 +73,7 @@
margin: 0 0 -3rem -4rem; margin: 0 0 -3rem -4rem;
} }
.form-group { .row {
margin-bottom: 1.2rem; margin-bottom: 1.2rem;
&.has-error { &.has-error {
...@@ -74,14 +81,6 @@ ...@@ -74,14 +81,6 @@
border: 1px solid $ui-orange; border: 1px solid $ui-orange;
} }
} }
.checkbox-row,
.phone-input,
.textarea-group {
.validation-message {
transform: translate(20rem, 0);
}
}
} }
} }
} }
......
...@@ -15,7 +15,7 @@ var Checkbox = React.createClass({ ...@@ -15,7 +15,7 @@ var Checkbox = React.createClass({
this.props.className this.props.className
); );
return ( return (
<FRCCheckbox elementWrapperClassName={classes} {... this.props} /> <FRCCheckbox rowClassName={classes} {... this.props} />
); );
} }
}); });
......
...@@ -12,7 +12,7 @@ $pass-bg: lighten($ui-aqua, 35%); ...@@ -12,7 +12,7 @@ $pass-bg: lighten($ui-aqua, 35%);
.input { .input {
transition: all .5s ease; transition: all .5s ease;
margin: .75rem 0; margin-bottom: .75rem;
border: 1px solid $active-gray; border: 1px solid $active-gray;
border-radius: 5px; border-radius: 5px;
background-color: $base-bg; background-color: $base-bg;
......
...@@ -42,7 +42,7 @@ var PhoneInput = React.createClass({ ...@@ -42,7 +42,7 @@ var PhoneInput = React.createClass({
return ( return (
<Row {... this.getRowProperties()} <Row {... this.getRowProperties()}
htmlFor={this.getId()} htmlFor={this.getId()}
elementWrapperClassName={classNames('phone-input', this.props.className)} rowClassName={classNames('phone-input', this.props.className)}
> >
<div className="input-group"> <div className="input-group">
<ReactPhoneInput className="form-control" <ReactPhoneInput className="form-control"
...@@ -53,9 +53,9 @@ var PhoneInput = React.createClass({ ...@@ -53,9 +53,9 @@ var PhoneInput = React.createClass({
label={null} label={null}
disabled={this.isFormDisabled() || this.props.disabled} disabled={this.isFormDisabled() || this.props.disabled}
/> />
{this.renderErrorMessage()}
</div> </div>
{this.renderHelp()} {this.renderHelp()}
{this.renderErrorMessage()}
</Row> </Row>
); );
} }
......
@import "../../colors"; @import "../../colors";
.input-group { .input-group {
margin: .75rem 0;
width: 100%; width: 100%;
} }
.react-tel-input { .react-tel-input {
margin-bottom: .75rem;
width: 100%; width: 100%;
input { input {
......
...@@ -4,8 +4,13 @@ ...@@ -4,8 +4,13 @@
* the formsy-react-components * the formsy-react-components
*/ */
.form-group { .row {
.required-symbol { .required-symbol {
display: none; display: none;
} }
label {
display: inline-block;
margin-bottom: .75rem;
}
} }
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
select { select {
transition: all .5s ease; transition: all .5s ease;
margin: .75rem 0; margin-bottom: .75rem;
border: 1px solid $active-gray; border: 1px solid $active-gray;
border-radius: 5px; border-radius: 5px;
background: $ui-light-gray url("../../../static/svgs/forms/carot.svg") no-repeat right center; background: $ui-light-gray url("../../../static/svgs/forms/carot.svg") no-repeat right center;
......
...@@ -17,7 +17,7 @@ var TextArea = React.createClass({ ...@@ -17,7 +17,7 @@ var TextArea = React.createClass({
return ( return (
<FRCTextarea {... this.props} <FRCTextarea {... this.props}
className={classes} className={classes}
elementWrapperClassName="textarea-group" /> rowClassName="textarea-row" />
); );
} }
}); });
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.textarea { .textarea {
transition: all 1s ease; transition: all 1s ease;
margin: .75rem 0; margin-bottom: .75rem;
border: 1px solid $active-gray; border: 1px solid $active-gray;
border-radius: 5px; border-radius: 5px;
background-color: $ui-light-gray; background-color: $ui-light-gray;
......
...@@ -66,16 +66,6 @@ ...@@ -66,16 +66,6 @@
margin-bottom: 1.25rem; margin-bottom: 1.25rem;
} }
} }
.validation-message {
margin-top: .5rem;
}
.checkbox-row {
.validation-message {
margin-top: 0;
}
}
} }
&.organization-step { &.organization-step {
...@@ -115,12 +105,6 @@ ...@@ -115,12 +105,6 @@
} }
} }
} }
}
.validation-message {
margin-top: .75rem;
} }
p { p {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment