Skip to content

Commit

Permalink
feat: add QR Code to ShareModal (#2320)
Browse files Browse the repository at this point in the history
* add dependency

* add qr code to share modal

* remove share file icon and increase size of qr code

* chore: fix dep-check

---------

Co-authored-by: Russell Dempsey <[email protected]>
  • Loading branch information
badgooooor and SgtPooki authored Jan 29, 2025
1 parent 878975a commit 5dbccfd
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 4 deletions.
1 change: 1 addition & 0 deletions .aegir.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default {
'react-identicons',
'react-joyride',
'react-overlays',
'react-qr-code',
'react-virtualized',
'redux-bundler-react',
'tachyons',
Expand Down
20 changes: 20 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"react-identicons": "^1.2.4",
"react-joyride": "^2.3.0",
"react-overlays": "^2.1.1",
"react-qr-code": "^2.0.15",
"react-scripts": "5.0.1",
"react-virtualized": "^9.22.3",
"redux-bundler": "^26.1.0",
Expand Down
13 changes: 9 additions & 4 deletions src/files/modals/share-modal/ShareModal.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import React from 'react'
import PropTypes from 'prop-types'
import ShareIcon from '../../../icons/StrokeShare.js'
import QRCode from 'react-qr-code'
import Button from '../../../components/button/button.tsx'
import { withTranslation } from 'react-i18next'
import { CopyToClipboard } from 'react-copy-to-clipboard'
import { Modal, ModalActions, ModalBody } from '../../../components/modal/Modal.js'

const ShareModal = ({ t, tReady, onLeave, link, className, ...props }) => (
<Modal {...props} className={className} onCancel={onLeave} >
<ModalBody title={t('shareModal.title')} Icon={ShareIcon}>
<p className='charcoal w-90 tl center'>{t('shareModal.description')}</p>

<ModalBody title={t('shareModal.title')}>
<p className='charcoal w-90 center'>{t('shareModal.description')}</p>
<div className='flex justify-center pb3'>
<QRCode
size={180}
value={link}
/>
</div>
<div className='flex center w-90 pb2'>
<input
value={link}
Expand Down

0 comments on commit 5dbccfd

Please sign in to comment.