Skip to content

Commit

Permalink
Use generally less wide popups
Browse files Browse the repository at this point in the history
  • Loading branch information
mybearworld committed Jul 22, 2024
1 parent c88985b commit 75f992c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export type PopupProps = {
onOpenChange: (open: boolean) => void;
};
className?: string;
wide?: boolean;
};
export const Popup = (props: PopupProps) => {
return (
Expand All @@ -23,8 +24,9 @@ export const Popup = (props: PopupProps) => {
<Dialog.Content
aria-describedby={undefined}
className={twMerge(
"absolute inset-0 z-[--z-popup] m-auto h-fit max-h-[90vh] w-fit max-w-[90vw] overflow-auto rounded-xl bg-white px-4 py-2 dark:bg-gray-900",
"absolute inset-0 z-[--z-popup] m-auto h-fit max-h-[90vh] w-fit overflow-auto rounded-xl bg-white px-4 py-2 dark:bg-gray-900",
props.className,
props.wide ? "max-w-[90vw]" : "max-w-[40vw]",
)}
>
{props.children}
Expand Down
1 change: 1 addition & 0 deletions src/components/Post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ export const AttachmentView = (props: AttachmentViewProps) => {
return (
<Popup
triggerAsChild
wide
trigger={
<div className="flex flex-col items-center">
{closeRow}
Expand Down

0 comments on commit 75f992c

Please sign in to comment.