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 modal style #1237

Merged
merged 1 commit into from
Dec 10, 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
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,7 @@ export const MediaCurrentRecording = () => {

<Sheet open={detailIsOpen} onOpenChange={(open) => setDetailIsOpen(open)}>
<SheetContent
container="main-panel-content"
aria-describedby={undefined}
side="bottom"
className="rounded-t-2xl shadow-lg max-h-content overflow-y-scroll"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ export const AssistantMessageComponent = (props: {
onOpenChange={(value) => setShadowing(value)}
>
<SheetContent
container="main-panel-content"
aria-describedby={undefined}
side="bottom"
className="h-content p-0 flex flex-col gap-0"
Expand Down
8 changes: 6 additions & 2 deletions enjoy/src/renderer/components/ui/alert-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
const AlertDialogContent = React.forwardRef<
React.ElementRef<typeof AlertDialogPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> & {
container?: HTMLElement;
container?: HTMLElement | string;
}
>(({ className, container, ...props }, ref) => (
<AlertDialogPortal
container={container || document.getElementById("main-panel-content")}
container={
typeof container === "string"
? document.getElementById(container)
: container
}
>
<AlertDialogOverlay className="absolute inset-0" />
<AlertDialogPrimitive.Content
Expand Down
8 changes: 6 additions & 2 deletions enjoy/src/renderer/components/ui/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,15 @@ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
const DialogContent = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {
container?: HTMLElement;
container?: HTMLElement | string;
}
>(({ className, children, container, ...props }, ref) => (
<DialogPortal
container={container || document.getElementById("main-panel-content")}
container={
typeof container === "string"
? document.getElementById(container)
: container
}
>
<DialogOverlay />
<DialogPrimitive.Content
Expand Down
8 changes: 6 additions & 2 deletions enjoy/src/renderer/components/ui/sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ interface SheetContentProps
extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,
VariantProps<typeof sheetVariants> {
displayClose?: boolean;
container?: HTMLElement;
container?: HTMLElement | string;
}

const SheetContent = React.forwardRef<
Expand All @@ -72,7 +72,11 @@ const SheetContent = React.forwardRef<
ref
) => (
<SheetPortal
container={container || document.getElementById("main-panel-content")}
container={
typeof container === "string"
? document.getElementById(container)
: container
}
>
<SheetOverlay className="absolute" />
<SheetPrimitive.Content
Expand Down
2 changes: 2 additions & 0 deletions enjoy/src/renderer/context/chat-session-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ export const ChatSessionProvider = ({
}}
>
<SheetContent
container="main-panel-content"
side="bottom"
className="h-content p-0 flex flex-col gap-0"
displayClose={false}
Expand All @@ -506,6 +507,7 @@ export const ChatSessionProvider = ({
}}
>
<SheetContent
container="main-panel-content"
aria-describedby={undefined}
side="bottom"
className="rounded-t-2xl shadow-lg max-h-content overflow-y-scroll"
Expand Down
1 change: 1 addition & 0 deletions enjoy/src/renderer/context/course-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export const CourseProvider = ({
}}
>
<SheetContent
container="main-panel-content"
side="bottom"
className="h-content p-0 flex flex-col gap-0"
displayClose={false}
Expand Down
Loading