Skip to content

Commit

Permalink
fix: move 'Upload QR Code' button to the right of the color picker bu…
Browse files Browse the repository at this point in the history
…tton (#62)

* fix: move 'Upload QR Code' button to the right of the color picker button

* chore: increment version

* chore: build

Co-authored-by: Johnny Almonte <[email protected]>
  • Loading branch information
johnny243 and johnny243 authored Sep 6, 2021
1 parent f8c2bc0 commit 65f5ed3
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 20 deletions.
14 changes: 6 additions & 8 deletions app/components/EditEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,14 @@ export default class EditEntry extends React.Component {
<div className="color-picker-swatch" onClick={this.handleSwatchClick}>
<div style={swatchStyle} />
</div>
{id == null && (
<QRCodeReader
onSuccess={this.onQRCodeSuccess}
onError={this.onQRCodeError}
/>
)}
</div>
</div>
{id == null && (
<div className="sk-panel-section sk-panel-hero align-items-center">
<QRCodeReader
onSuccess={this.onQRCodeSuccess}
onError={this.onQRCodeError}
/>
</div>
)}
<form onSubmit={this.onSave} autoComplete="off">
<div className="sk-panel-section">
<input
Expand Down
20 changes: 11 additions & 9 deletions app/components/QRCodeReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,17 @@ export default class QRCodeReader extends React.Component {

render() {
return (
<div className="sk-button info">
<label className="no-style">
<input
type="file"
style={{ display: 'none' }}
onChange={this.onImageSelected}
/>
<div className="sk-label">Upload QR Code</div>
</label>
<div className="qr-code-reader-container">
<div className="sk-button info">
<label className="no-style">
<input
type="file"
style={{ display: 'none' }}
onChange={this.onImageSelected}
/>
<div className="sk-label">Upload QR Code</div>
</label>
</div>
</div>
);
}
Expand Down
4 changes: 4 additions & 0 deletions app/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -399,3 +399,7 @@ html {
// opacity: 0;
// }
// }

.qr-code-reader-container {
margin-left: 15px;
}
2 changes: 1 addition & 1 deletion dist/dist.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/dist.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sn-token-vault",
"version": "2.0.1",
"version": "2.0.2",
"main": "dist/dist.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down

0 comments on commit 65f5ed3

Please sign in to comment.