-
Notifications
You must be signed in to change notification settings - Fork 485
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
107 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { chakra } from '@chakra-ui/react'; | ||
import React from 'react'; | ||
|
||
import NftMediaFullscreenModal from './NftMediaFullscreenModal'; | ||
|
||
interface Props { | ||
src: string; | ||
isOpen: boolean; | ||
onClose: () => void; | ||
} | ||
|
||
const NftHtmlWithFullscreen = ({ src, isOpen, onClose }: Props) => { | ||
return ( | ||
<NftMediaFullscreenModal isOpen={ isOpen } onClose={ onClose }> | ||
<chakra.iframe | ||
w="90vw" | ||
h="90vh" | ||
src={ src } | ||
sandbox="allow-scripts" | ||
/> | ||
</NftMediaFullscreenModal> | ||
); | ||
}; | ||
|
||
export default NftHtmlWithFullscreen; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { | ||
Image, | ||
} from '@chakra-ui/react'; | ||
import React from 'react'; | ||
|
||
import NftMediaFullscreenModal from './NftMediaFullscreenModal'; | ||
|
||
interface Props { | ||
src: string; | ||
isOpen: boolean; | ||
onClose: () => void; | ||
} | ||
|
||
const NftImageWithFullscreen = ({ src, isOpen, onClose }: Props) => { | ||
return ( | ||
<NftMediaFullscreenModal isOpen={ isOpen } onClose={ onClose }> | ||
<Image src={ src } alt="Token instance image" maxH="90vh" maxW="90vw"/> | ||
</NftMediaFullscreenModal> | ||
); | ||
}; | ||
|
||
export default NftImageWithFullscreen; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { chakra } from '@chakra-ui/react'; | ||
import React from 'react'; | ||
|
||
import NftMediaFullscreenModal from './NftMediaFullscreenModal'; | ||
import { videoPlayProps } from './utils'; | ||
|
||
interface Props { | ||
src: string; | ||
isOpen: boolean; | ||
onClose: () => void; | ||
} | ||
|
||
const NftVideoWithFullscreen = ({ src, isOpen, onClose }: Props) => { | ||
return ( | ||
<NftMediaFullscreenModal isOpen={ isOpen } onClose={ onClose }> | ||
<chakra.video | ||
{ ...videoPlayProps } | ||
src={ src } | ||
maxH="90vh" | ||
maxW="90vw" | ||
/> | ||
</NftMediaFullscreenModal> | ||
); | ||
}; | ||
|
||
export default NftVideoWithFullscreen; |