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 #33 from cardano-foundation/feature/cip45-peer-con…
…nect Feature/cip45 peer connect
- Loading branch information
Showing
10 changed files
with
35,922 additions
and
24,508 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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
module.exports = { | ||
stories: ['../src/**/*.stories.tsx'], | ||
addons: [ | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@storybook/addon-interactions', | ||
], | ||
addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-interactions'], | ||
framework: '@storybook/react', | ||
}; | ||
core: { | ||
builder: '@storybook/builder-webpack5' | ||
}, | ||
docs: { | ||
autodocs: true | ||
} | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,14 @@ | ||
import { Meta } from '@storybook/react/types-6-0'; | ||
import { Story } from '@storybook/react'; | ||
import ModalDialog from './ModalDialog'; | ||
import { ModalDialogProps } from '../../global'; | ||
|
||
export default { | ||
title: 'Components/ModalDialog', | ||
component: ModalDialog, | ||
} as Meta; | ||
|
||
const Template: Story<ModalDialogProps> = (args) => <ModalDialog {...args} />; | ||
|
||
export const DefaultList = Template.bind({}); | ||
DefaultList.args = { content: 'Hallo Hallo' }; |
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,35 @@ | ||
import { ModalDialogProps } from '../../global'; | ||
import { Modal, ModalContent } from './StyledDialogElements'; | ||
import { QRCode } from 'react-qrcode-logo'; | ||
|
||
const ModalDialog = (props: ModalDialogProps) => { | ||
const { visible, content, handleClose, icon } = props; | ||
|
||
return ( | ||
<Modal | ||
onClick={() => { | ||
if (typeof handleClose === 'function') { | ||
handleClose(); | ||
} | ||
}} | ||
style={{ display: visible ? 'block' : 'none' }} | ||
> | ||
<ModalContent> | ||
<QRCode | ||
removeQrCodeBehindLogo={true} | ||
logoImage={icon ? icon : undefined} | ||
ecLevel="H" | ||
eyeRadius={5} | ||
qrStyle="dots" | ||
value={content} | ||
/> | ||
<p style={{ maxWidth: 300 }}> | ||
You can use a CIP45 compliant mobile wallet on your smartphone (e.g. | ||
Eternl) to connect an external peer to peer wallet | ||
</p> | ||
</ModalContent> | ||
</Modal> | ||
); | ||
}; | ||
|
||
export default ModalDialog; |
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 styled from 'styled-components'; | ||
|
||
export const Modal = styled.div` | ||
position: fixed; | ||
z-index: 100; | ||
left: 0; | ||
top: 0; | ||
width: 100%; | ||
height: 100%; | ||
overflow: auto; | ||
background-color: rgb(0, 0, 0); | ||
background-color: rgba(0, 0, 0, 0.4); | ||
`; | ||
|
||
export const ModalContent = styled.div` | ||
background-color: #fefefe; | ||
margin: 15% auto; | ||
padding: 20px; | ||
border: 1px solid #aeaeae; | ||
border-radius: 9px; | ||
width: fit-content; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
`; |
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