Refine replay modal sheet styling
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
.modal {
|
||||||
|
width: min(calc(100dvw - 48px), 1320px);
|
||||||
|
overflow: hidden;
|
||||||
|
border-top-left-radius: 8px;
|
||||||
|
border-top-right-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sheet {
|
||||||
|
border-top-left-radius: 8px;
|
||||||
|
border-top-right-radius: 8px;
|
||||||
|
}
|
||||||
@@ -3,13 +3,14 @@ import { Column, Dialog, Modal, type ModalProps } from '@umami/react-zen';
|
|||||||
import { ReplayPlayback } from '@/app/(main)/websites/[websiteId]/replays/[replayId]/ReplayPlayback';
|
import { ReplayPlayback } from '@/app/(main)/websites/[websiteId]/replays/[replayId]/ReplayPlayback';
|
||||||
import { useNavigation } from '@/components/hooks';
|
import { useNavigation } from '@/components/hooks';
|
||||||
import { buildPath } from '@/lib/url';
|
import { buildPath } from '@/lib/url';
|
||||||
|
import styles from './ReplayModal.module.css';
|
||||||
|
|
||||||
export interface ReplayModalProps extends ModalProps {
|
export interface ReplayModalProps extends ModalProps {
|
||||||
websiteId: string;
|
websiteId: string;
|
||||||
replayId?: string;
|
replayId?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ReplayModal({ websiteId, replayId, ...props }: ReplayModalProps) {
|
export function ReplayModal({ websiteId, replayId, className, ...props }: ReplayModalProps) {
|
||||||
const {
|
const {
|
||||||
router,
|
router,
|
||||||
query: { replay },
|
query: { replay },
|
||||||
@@ -33,15 +34,16 @@ export function ReplayModal({ websiteId, replayId, ...props }: ReplayModalProps)
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
|
{...props}
|
||||||
placement="bottom"
|
placement="bottom"
|
||||||
offset="80px"
|
offset="80px"
|
||||||
|
className={[styles.modal, className].filter(Boolean).join(' ')}
|
||||||
isOpen={!!activeReplayId}
|
isOpen={!!activeReplayId}
|
||||||
onOpenChange={handleOpenChange}
|
onOpenChange={handleOpenChange}
|
||||||
isDismissable
|
isDismissable
|
||||||
{...props}
|
|
||||||
>
|
>
|
||||||
<Column height="100%" maxWidth="1320px" style={{ margin: '0 auto' }}>
|
<Column height="100%">
|
||||||
<Dialog variant="sheet">
|
<Dialog variant="sheet" className={styles.sheet}>
|
||||||
{({ close }) => (
|
{({ close }) => (
|
||||||
<Column padding="6">
|
<Column padding="6">
|
||||||
{activeReplayId && (
|
{activeReplayId && (
|
||||||
|
|||||||
Reference in New Issue
Block a user