Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mj/st - remove bottom margin of last row if there is no country #401

Merged
merged 1 commit into from
May 3, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/components/AddressInput.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import flow from 'lodash.flow';
import classnames from 'classnames';

import CountryInput from './CountryInput';
import StateInput from './StateInput';
Expand Down Expand Up @@ -102,7 +103,7 @@ class AddressInput extends React.Component {
<Row className="no-gutters">
<Col sm={6} xs={5}>
<ValidatedFormGroup
className="pr-3"
className={classnames('pr-3', { 'mb-0': !showCountry })}
error={error.city}
label={showLabels ? labels.city : null}
>
Expand All @@ -121,7 +122,7 @@ class AddressInput extends React.Component {
</Col>
<Col sm={2} xs={3}>
<ValidatedFormGroup
className="pr-3"
className={classnames('pr-3', { 'mb-0': !showCountry })}
error={error.state}
label={showLabels ? labels.state : null}
>
Expand All @@ -139,6 +140,7 @@ class AddressInput extends React.Component {
</Col>
<Col sm={4} xs={4}>
<ValidatedFormGroup
className={classnames({ 'mb-0': !showCountry })}
label={showLabels ? labels.postal : null}
error={error.postal}
>
Expand Down