feat: Add QR Code to Share Object Modal (#11735)

Co-authored-by: Kaan Kabalak <kaankabalak@gmail.com>
This commit is contained in:
S Santhosh Nagaraj 2021-03-12 00:51:45 +05:30 committed by GitHub
parent f92b7a5621
commit 9b54fcdf12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions

View File

@ -26,6 +26,7 @@ import {
SHARE_OBJECT_EXPIRY_HOURS, SHARE_OBJECT_EXPIRY_HOURS,
SHARE_OBJECT_EXPIRY_MINUTES SHARE_OBJECT_EXPIRY_MINUTES
} from "../constants" } from "../constants"
import QRCode from "react-qr-code";
export class ShareObjectModal extends React.Component { export class ShareObjectModal extends React.Component {
constructor(props) { constructor(props) {
@ -89,6 +90,7 @@ export class ShareObjectModal extends React.Component {
<ModalHeader>Share Object</ModalHeader> <ModalHeader>Share Object</ModalHeader>
<ModalBody> <ModalBody>
<div className="input-group copy-text"> <div className="input-group copy-text">
<QRCode value={url} size={128}/>
<label>Shareable Link</label> <label>Shareable Link</label>
<input <input
type="text" type="text"

View File

@ -75,6 +75,11 @@
border-color: darken(@input-border, 5%); border-color: darken(@input-border, 5%);
} }
} }
svg {
display: block;
margin: 0 auto 5px;
}
} }
/*-------------------------- /*--------------------------
@ -150,4 +155,4 @@
100% { 100% {
transform: rotate(360deg); transform: rotate(360deg);
} }
} }

View File

@ -84,6 +84,7 @@
"react-dropzone": "^11.0.1", "react-dropzone": "^11.0.1",
"react-infinite-scroller": "^1.2.4", "react-infinite-scroller": "^1.2.4",
"react-onclickout": "^2.0.8", "react-onclickout": "^2.0.8",
"react-qr-code": "^1.1.1",
"react-redux": "^5.1.2", "react-redux": "^5.1.2",
"react-router-dom": "^5.2.0", "react-router-dom": "^5.2.0",
"redux": "^4.0.5", "redux": "^4.0.5",