Skip to content

Commit

Permalink
Merge pull request #988 from sharetribe/enquiry-to-tx-ui
Browse files Browse the repository at this point in the history
Layout changes to listing and tx (enquiry) page
  • Loading branch information
lyyder authored Dec 31, 2018
2 parents 7d64044 + b20c6ca commit 5831cb7
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 10 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ way to update this template, but currently, we follow a pattern:

## Upcoming version 2018-XX-XX

- [change] Layout changes to BookingPanel on listing and transaction pages.
[#988](https://github.com/sharetribe/flex-template-web/pull/988)
- [fix] Fix wrong booking title on listing page that has been introduced in #969.
[#987](https://github.com/sharetribe/flex-template-web/pull/987)
- [fix] yarn.lock file was not up to date
Expand Down
12 changes: 5 additions & 7 deletions src/components/BookingPanel/BookingPanel.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,16 @@
@media (--viewportLarge) {
display: block;
margin-top: -2px;
margin-bottom: 49px;
margin-bottom: 33px;
}
}

.bookingTitle {
@media (--viewportMedium) {
/* Font */
color: var(--matterColor);
/* Font */
color: var(--matterColor);

margin-top: 0;
margin-bottom: 9px;
}
margin-top: 0;
margin-bottom: 9px;
}

.bookingHelp {
Expand Down
6 changes: 5 additions & 1 deletion src/components/BookingPanel/BookingPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const BookingPanel = props => {
const {
rootClassName,
className,
titleClassName,
listing,
isOwnListing,
unitType,
Expand Down Expand Up @@ -89,6 +90,7 @@ const BookingPanel = props => {
: 'BookingPanel.perUnit';

const classes = classNames(rootClassName || css.root, className);
const titleClasses = classNames(titleClassName || css.bookingTitle);

return (
<div className={classes}>
Expand All @@ -108,7 +110,7 @@ const BookingPanel = props => {
</div>

<div className={css.bookingHeading}>
<h2 className={css.bookingTitle}>{title}</h2>
<h2 className={titleClasses}>{title}</h2>
{subTitleText ? <div className={css.bookingHelp}>{subTitleText}</div> : null}
</div>
{!isClosed ? (
Expand Down Expand Up @@ -154,6 +156,7 @@ const BookingPanel = props => {
BookingPanel.defaultProps = {
rootClassName: null,
className: null,
titleClassName: null,
isOwnListing: false,
subTitle: null,
unitType: config.bookingUnitType,
Expand All @@ -164,6 +167,7 @@ BookingPanel.defaultProps = {
BookingPanel.propTypes = {
rootClassName: string,
className: string,
titleClassName: string,
listing: propTypes.listing.isRequired,
isOwnListing: bool,
unitType: propTypes.bookingUnitType,
Expand Down
8 changes: 8 additions & 0 deletions src/components/TransactionPanel/TransactionPanel.css
Original file line number Diff line number Diff line change
Expand Up @@ -419,3 +419,11 @@
.bookingPanel {
margin: 16px 48px 48px 48px;
}

.bookingTitle {
/* Font */
color: var(--matterColor);

margin-top: 0;
margin-bottom: 1px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ export const BookingPanelMaybe = props => {
return canShowBookingPanel ? (
<BookingPanel
className={css.bookingPanel}
titleClassName={css.bookingTitle}
isOwnListing={false}
listing={listing}
handleBookingSubmit={() => console.log('submit')}
Expand Down
2 changes: 1 addition & 1 deletion src/containers/ListingPage/ListingPage.css
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
.bookingPanel {
@media (--viewportLarge) {
display: block;
margin-top: 87px;
margin-top: 95px;
margin-left: 60px;
border-left-style: solid;
border-left-width: 1px;
Expand Down
2 changes: 1 addition & 1 deletion src/forms/BookingDatesForm/BookingDatesForm.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

.bookingDates {
flex-shrink: 0;
margin-bottom: 46px;
margin-bottom: 38px;

/* Ensure that calendar dropdown gets some stacking context relative to other form items below */
z-index: 1;
Expand Down

0 comments on commit 5831cb7

Please sign in to comment.