Skip to content

Fix searchbox fit overlays on mobile #3149

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

Merged
Show file tree
Hide file tree
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
8 changes: 7 additions & 1 deletion client/modules/App/components/Overlay.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import PropTypes from 'prop-types';
import React, { useCallback, useRef } from 'react';
import MediaQuery from 'react-responsive';
import { useSelector } from 'react-redux';
import { useHistory } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
Expand Down Expand Up @@ -54,7 +55,7 @@ const Overlay = ({
<header className="overlay__header">
<h2 className="overlay__title">{title}</h2>
<div className="overlay__actions">
{actions}
<MediaQuery minWidth={770}>{actions}</MediaQuery>
<button
className="overlay__close-button"
onClick={close}
Expand All @@ -64,6 +65,11 @@ const Overlay = ({
</button>
</div>
</header>
<MediaQuery maxWidth={769}>
{actions && (
<div className="overlay__actions-mobile">{actions}</div>
)}
</MediaQuery>
{children}
</section>
</div>
Expand Down
4 changes: 4 additions & 0 deletions client/styles/components/_overlay.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
display: flex;
}

.overlay__actions-mobile {
padding-left: #{24/ $base-font-size}rem;
}

.overlay__title {
font-size: #{math.div(21, $base-font-size)}rem;
}
Expand Down
Loading