mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-30 18:16:48 +10:00
Fix listing feature edit layout and copies
This commit is contained in:
parent
65ef465d05
commit
20e00522c1
3 changed files with 40 additions and 4 deletions
|
|
@ -1 +1,22 @@
|
|||
@import '../../marketplace.css';
|
||||
|
||||
.root {
|
||||
flex-grow: 1;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 11px 24px 0 24px;
|
||||
}
|
||||
|
||||
.form {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin-bottom: 19px;
|
||||
|
||||
@media (--viewportLarge) {
|
||||
margin-bottom: 44px;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ import { createSlug } from '../../util/urlHelpers';
|
|||
import { EditListingFeaturesForm } from '../../containers';
|
||||
import { NamedLink } from '../../components';
|
||||
|
||||
import css from './EditListingFeaturesPanel.css';
|
||||
|
||||
const EditListingFeaturesPanel = props => {
|
||||
const {
|
||||
rootClassName,
|
||||
|
|
@ -22,7 +24,7 @@ const EditListingFeaturesPanel = props => {
|
|||
errors,
|
||||
} = props;
|
||||
|
||||
const classes = classNames(rootClassName || className);
|
||||
const classes = classNames(rootClassName || css.root, className);
|
||||
const currentListing = ensureListing(listing);
|
||||
const { title, publicData } = currentListing.attributes;
|
||||
const listingTitle = title || '';
|
||||
|
|
@ -35,9 +37,9 @@ const EditListingFeaturesPanel = props => {
|
|||
);
|
||||
|
||||
const panelTitle = currentListing.id ? (
|
||||
<FormattedMessage id="EditListingLocationPanel.title" values={{ listingTitle: listingLink }} />
|
||||
<FormattedMessage id="EditListingFeaturesPanel.title" values={{ listingTitle: listingLink }} />
|
||||
) : (
|
||||
<FormattedMessage id="EditListingLocationPanel.createListingTitle" />
|
||||
<FormattedMessage id="EditListingFeaturesPanel.createListingTitle" />
|
||||
);
|
||||
|
||||
const currentFeaturesArray = publicData && publicData.amenities;
|
||||
|
|
@ -50,8 +52,9 @@ const EditListingFeaturesPanel = props => {
|
|||
|
||||
return (
|
||||
<div className={classes}>
|
||||
<h1>{panelTitle}</h1>
|
||||
<h1 className={css.title}>{panelTitle}</h1>
|
||||
<EditListingFeaturesForm
|
||||
className={css.form}
|
||||
initialValues={currentFeatures}
|
||||
onSubmit={values => {
|
||||
const entries = toPairs(values);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,18 @@
|
|||
}
|
||||
|
||||
.root {
|
||||
/* Dimensions */
|
||||
width: 100%;
|
||||
height: auto;
|
||||
|
||||
/* Layout */
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
|
||||
@media (--viewportMedium) {
|
||||
padding-top: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
.features {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue