Marketplace: hide search input when viewing subscriptions page on mobile

Corrected capitalisation of `classNames` in `LikertScale`.
This commit is contained in:
raicem 2023-09-26 21:49:28 +03:00 committed by And Finally
parent df4023b54f
commit ecdaca8eca
3 changed files with 37 additions and 9 deletions

View File

@ -31,6 +31,14 @@
}
}
.woocommerce-marketplace--my-subscriptions {
@media (width <= $breakpoint-medium) {
.woocommerce-marketplace__search {
display: none;
}
}
}
.woocommerce-marketplace__header-title {
align-items: center;
align-self: stretch;

View File

@ -2,7 +2,7 @@
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import classnames from 'classnames';
import classNames from 'classnames';
/**
* Internal dependencies
@ -52,7 +52,7 @@ export default function LikertScale( props: LikertScaleProps ): JSX.Element {
},
];
const classes = classnames( 'woocommerce-marketplace__likert-scale', {
const classes = classNames( 'woocommerce-marketplace__likert-scale', {
'validation-failed': validationFailed,
} );

View File

@ -1,22 +1,42 @@
/**
* External dependencies
*/
import { useContext } from '@wordpress/element';
/**
* Internal dependencies
*/
import './marketplace.scss';
import { MarketplaceContextProvider } from './contexts/marketplace-context';
import {
MarketplaceContextProvider,
MarketplaceContext,
} from './contexts/marketplace-context';
import Header from './components/header/header';
import Content from './components/content/content';
import Footer from './components/footer/footer';
import FeedbackModal from './components/feedback-modal/feedback-modal';
function MarketplaceComponents() {
const { selectedTab } = useContext( MarketplaceContext );
const classNames =
'woocommerce-marketplace' +
( selectedTab ? ' woocommerce-marketplace--' + selectedTab : '' );
return (
<div className={ classNames }>
<Header />
<Content />
<FeedbackModal />
<Footer />
</div>
);
}
export default function Marketplace() {
return (
<MarketplaceContextProvider>
<div className="woocommerce-marketplace">
<Header />
<Content />
<FeedbackModal />
<Footer />
</div>
<MarketplaceComponents />
</MarketplaceContextProvider>
);
}