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

Merged
2 changes: 1 addition & 1 deletion src/components/Common/DateInputV2.tsx
Original file line number Diff line number Diff line change
@@ -348,7 +348,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>({
2 changes: 1 addition & 1 deletion src/components/Patient/PatientHome.tsx
Original file line number Diff line number Diff line change
@@ -456,7 +456,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>