Skip to content

Commit

Permalink
Add styling to upload button
Browse files Browse the repository at this point in the history
Signed-off-by: Shiva <[email protected]>
  • Loading branch information
shiva-beehyv committed Apr 4, 2024
1 parent caa90bb commit ac6144c
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
import {scanFilesForQr} from "../../../utils/qr-utils";
import {QrScanResult} from "../../../types/data-types";
import {SetScanResultFunction} from "../../../types/function-types";
import StyledButton from "./commons/StyledButton";

export const ImportFromFile = ({setScanResult}: {setScanResult: SetScanResultFunction}) => {
return (
<div style={{margin: "12px auto", display: "grid", placeContent: "center"}}>
<label htmlFor={"upload-qr"} style={{font: 'normal normal normal 16px/21px Inter'}}>Upload your certificate</label><br/>
<StyledButton>
<label htmlFor={"upload-qr"}>
Upload your certificate</label>
</StyledButton>
<br/>
<input
type="file"
id="upload-qr"
name="upload-qr"
accept=".png, .jpeg, .jpg, .pdf"
style={{
margin: "8px auto"
margin: "8px auto",
display: "none"
}}
onChange={e => {
const file = e?.target?.files && e?.target?.files[0];
Expand All @@ -22,6 +28,6 @@ export const ImportFromFile = ({setScanResult}: {setScanResult: SetScanResultFun
setScanResult(scanResult);
});
}}
/>`
/>
</div>);
}

0 comments on commit ac6144c

Please sign in to comment.