Skip to content

Commit 522146d

Browse files
committed
fix(): Fixing video modal
1 parent b7f1370 commit 522146d

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

src/components/animateModal/AnimatedModal.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export const ModalBody = ({
100100
<motion.div
101101
ref={modalRef}
102102
className={
103-
'min-h-[50%] max-h-[90%] md:max-w-[40%] bg-white dark:bg-neutral-950 border border-transparent dark:border-neutral-800 md:rounded-2xl relative z-10 flex flex-col flex-1 overflow-hidden'
103+
'min-h-[50%] max-h-[90%] md:max-w-[47%] bg-white dark:bg-neutral-950 border border-transparent dark:border-neutral-800 md:rounded-2xl relative z-10 flex flex-col flex-1 overflow-hidden'
104104
}
105105
initial={{
106106
opacity: 0,
@@ -136,7 +136,11 @@ export const ModalBody = ({
136136

137137
export const ModalContent = ({ children }: { children: ReactNode }) => {
138138
return (
139-
<div className={'flex flex-col flex-1 p-2 md:p-4 justify-center z-1000'}>
139+
<div
140+
className={
141+
'flex flex-col flex-1 p-2 md:p-4 justify-center z-1000 w-[50%]'
142+
}
143+
>
140144
{children}
141145
</div>
142146
);

src/components/animateModal/Modal.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,17 @@ const AnimatedModal = ({
4444
>
4545
{title}
4646
</Heading>
47-
<ReactPlayer controls url={videoUrl} />
47+
<ReactPlayer
48+
controls
49+
progressInterval={1000}
50+
previewTabIndex={0}
51+
url={videoUrl}
52+
style={{
53+
justifyContent: 'center',
54+
flex: 1,
55+
borderRadius: '0.5rem',
56+
}}
57+
/>
4858
</ModalContent>
4959
<ModalFooter>
5060
<Button

0 commit comments

Comments
 (0)