mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-30 02:56:20 -05:00
Merge pull request #3395 from benjiwheeler/join-flow-responsive-validation
make validations be the same width as inputs…
This commit is contained in:
commit
779520aa2a
3 changed files with 25 additions and 4 deletions
|
@ -117,6 +117,7 @@ class BirthDateStep extends React.Component {
|
||||||
options={birthMonthOptions}
|
options={birthMonthOptions}
|
||||||
validate={this.validateSelect}
|
validate={this.validateSelect}
|
||||||
validationClassName={classNames(
|
validationClassName={classNames(
|
||||||
|
'validation-birthdate',
|
||||||
'validation-birthdate-month',
|
'validation-birthdate-month',
|
||||||
'validation-left'
|
'validation-left'
|
||||||
)}
|
)}
|
||||||
|
@ -135,7 +136,10 @@ class BirthDateStep extends React.Component {
|
||||||
name="birth_year"
|
name="birth_year"
|
||||||
options={birthYearOptions}
|
options={birthYearOptions}
|
||||||
validate={this.validateSelect}
|
validate={this.validateSelect}
|
||||||
validationClassName="validation-birthdate-year"
|
validationClassName={classNames(
|
||||||
|
'validation-birthdate',
|
||||||
|
'validation-birthdate-year'
|
||||||
|
)}
|
||||||
/* eslint-disable react/jsx-no-bind */
|
/* eslint-disable react/jsx-no-bind */
|
||||||
onFocus={() => setFieldError('birth_year', null)}
|
onFocus={() => setFieldError('birth_year', null)}
|
||||||
/* eslint-enable react/jsx-no-bind */
|
/* eslint-enable react/jsx-no-bind */
|
||||||
|
|
|
@ -93,7 +93,10 @@ class CountryStep extends React.Component {
|
||||||
name="country"
|
name="country"
|
||||||
options={this.countryOptions}
|
options={this.countryOptions}
|
||||||
validate={this.validateSelect}
|
validate={this.validateSelect}
|
||||||
validationClassName="validation-full-width-input"
|
validationClassName={classNames(
|
||||||
|
'validation-full-width-input',
|
||||||
|
'validation-country'
|
||||||
|
)}
|
||||||
/* eslint-disable react/jsx-no-bind */
|
/* eslint-disable react/jsx-no-bind */
|
||||||
onFocus={() => setFieldError('country', null)}
|
onFocus={() => setFieldError('country', null)}
|
||||||
/* eslint-enable react/jsx-no-bind */
|
/* eslint-enable react/jsx-no-bind */
|
||||||
|
|
|
@ -56,11 +56,25 @@
|
||||||
.validation-full-width-input {
|
.validation-full-width-input {
|
||||||
transform: unset;
|
transform: unset;
|
||||||
margin-bottom: .75rem;
|
margin-bottom: .75rem;
|
||||||
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.validation-birthdate-input {
|
.validation-country {
|
||||||
|
top: .5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.validation-birthdate {
|
||||||
transform: unset;
|
transform: unset;
|
||||||
width: 8rem;
|
top: .5rem;
|
||||||
|
width: 19rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.validation-birthdate-month {
|
||||||
|
margin-right: -9.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.validation-birthdate-year {
|
||||||
|
margin-left: -9.625rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue