-
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.
Merge pull request #1127 from blockscout/nft-and-qr-modals
Nft and qr modals
- Loading branch information
Showing
37 changed files
with
455 additions
and
92 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
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
Binary file modified
BIN
+8.99 KB
(180%)
...hots__/AddressQrCode.pw.tsx_dark-color-mode_default-view-mobile-dark-mode-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+10.9 KB
(220%)
..._screenshots__/AddressQrCode.pw.tsx_default_default-view-mobile-dark-mode-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+8.99 KB
(380%)
...__screenshots__/AddressQrCode.pw.tsx_mobile_default-view-mobile-dark-mode-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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 |
---|---|---|
@@ -1,16 +1,18 @@ | ||
import { Icon, useColorModeValue } from '@chakra-ui/react'; | ||
import { Icon, useColorModeValue, chakra } from '@chakra-ui/react'; | ||
import React from 'react'; | ||
|
||
import nftIcon from 'icons/nft_shield.svg'; | ||
|
||
const NftFallback = () => { | ||
const NftFallback = ({ className }: {className?: string}) => { | ||
return ( | ||
<Icon | ||
className={ className } | ||
as={ nftIcon } | ||
p="50px" | ||
color={ useColorModeValue('blackAlpha.500', 'whiteAlpha.500') } | ||
bgColor={ useColorModeValue('blackAlpha.50', 'whiteAlpha.50') } | ||
/> | ||
); | ||
}; | ||
|
||
export default NftFallback; | ||
export default chakra(NftFallback); |
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,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,33 @@ | ||
import { chakra, useDisclosure } from '@chakra-ui/react'; | ||
import React from 'react'; | ||
|
||
import NftHtml from './NftHtml'; | ||
import NftMediaFullscreenModal from './NftMediaFullscreenModal'; | ||
|
||
interface Props { | ||
src: string; | ||
onLoad: () => void; | ||
onError: () => void; | ||
} | ||
|
||
const NftHtmlWithFullscreen = ({ src, onLoad, onError }: Props) => { | ||
const { isOpen, onOpen, onClose } = useDisclosure(); | ||
|
||
return ( | ||
<> | ||
<NftHtml src={ src } onLoad={ onLoad } onError={ onError } onClick={ onOpen }/> | ||
<NftMediaFullscreenModal isOpen={ isOpen } onClose={ onClose }> | ||
<chakra.iframe | ||
w="90vw" | ||
h="90vh" | ||
src={ src } | ||
sandbox="allow-scripts" | ||
onLoad={ onLoad } | ||
onError={ onError } | ||
/> | ||
</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
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; |
Oops, something went wrong.