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

Mobile UI Tweaks #232

Merged
merged 3 commits into from
Oct 30, 2024
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
5 changes: 5 additions & 0 deletions .changeset/cuddly-feet-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@burnt-labs/ui": minor
---

Added slight tweaks to fix mobile behavior
1 change: 1 addition & 0 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"dependencies": {
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-popover": "^1.0.7",
"@radix-ui/react-visually-hidden": "^1.1.0",
"@types/react-dom": "^18.2.18"
}
}
5 changes: 5 additions & 0 deletions packages/ui/src/dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from "react";
import * as DialogPrimitive from "@radix-ui/react-dialog";
import * as VisuallyHidden from "@radix-ui/react-visually-hidden";
import { cn } from "../lib/utils";

const Dialog = DialogPrimitive.Root;
Expand Down Expand Up @@ -33,13 +34,17 @@ const DialogContent = React.forwardRef<
<DialogOverlay />
<div className="ui-absolute ui-h-screen ui-w-screen ui-inset-0 ui-bg-modal-overlay ui-backdrop-blur-3xl ui-opacity-40 ui-bg-no-repeat ui-bg-cover ui-bg-center ui-bg-fixed ui-z-50" />
<DialogPrimitive.Content
aria-describedby={undefined}
className={cn(
"ui-z-50 ui-fixed ui-grid ui-w-full ui-max-w-lg ui-gap-4 ui-p-10 ui-duration-200 sm:ui-rounded-[48px] ui-left-[50%] ui-top-[50%] sm:ui-bg-black/20 !ui-flex ui-justify-center ui-flex-col sm:ui-block sm:ui-flex-none ui-h-screen sm:ui-h-auto sm:ui-backdrop-blur-2xl ui-data-[state=open]:ui-animate-in ui-data-[state=closed]:ui-animate-out ui-data-[state=closed]:ui-fade-out-0 ui-data-[state=open]:ui-fade-in-0 ui-data-[state=closed]:ui-zoom-out-95 ui-data-[state=open]:ui-zoom-in-95 ui-data-[state=closed]:ui-slide-out-to-left-1/2 ui-data-[state=closed]:ui-slide-out-to-top-[48%] ui-data-[state=open]:ui-slide-in-from-left-1/2 ui-data-[state=open]:ui-slide-in-from-top-[48%] ui-translate-x-[-50%] ui-translate-y-[-50%]",
className,
)}
ref={ref}
{...props}
>
<VisuallyHidden.Root>
<DialogPrimitive.Title />
</VisuallyHidden.Root>
{children}
</DialogPrimitive.Content>
</DialogPortal>
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ export function Input({
{...props}
className={`${
baseInputClassName || ""
} ui-z-10 ui-block ui-h-8 ui-w-full ui-border-b ui-relative ${
} ui-z-10 ui-block ui-h-8 ui-w-full ui-border-b ui-rounded-none ui-relative ${
error ? "ui-border-red-400" : ""
} ui-bg-transparent ui-font-akkuratLL ui-py-5 !ui-text-sm ui-text-zinc-100 ui-font-normal ui-leading-tight ui-outline-none`}
} ui-bg-transparent ui-font-akkuratLL ui-py-5 !ui-text-base ui-text-zinc-100 ui-font-normal ui-leading-tight ui-outline-none`}
onBlur={handleBlur}
onFocus={handleFocus}
onKeyDown={onKeyDown}
Expand Down
Loading
Loading