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

fix: DateInput and Actions button not optimised for mobile viewports #9432

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion src/components/Common/DateInputV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ const DateInputV2: React.FC<Props> = ({
const right = popOverX > viewportWidth - (allowTime ? 420 : 300);
const top = popOverY > viewportHeight - 400;

return `${right ? "md:-translate-x-1/2" : ""} ${top ? "md:-translate-y-[calc(100%+50px)]" : ""}`;
return `${right ? "sm:-translate-x-1/2" : ""} ${top ? "md:-translate-y-[calc(100%+50px)]" : ""} ${right ? "max-sm:-translate-x-1/2" : ""} ${top ? "max-sm:-translate-y-[calc(100%+50px)]" : ""}`.trim();
};

const domValue = useValueInjectionObserver<string>({
Expand Down
2 changes: 1 addition & 1 deletion src/components/Patient/PatientHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ export const PatientHome = (props: {
</div>
<div className="sticky top-20 mt-8 h-full lg:basis-1/6">
<section className="mb-4 space-y-2 md:flex">
<div className="mx-3 w-full lg:mx-0">
<div className="mx-auto w-full lg:mx-0">
<div className="font-semibold text-secondary-900">
{t("actions")}
</div>
Expand Down
Loading