source: imaps-frontend/src/components/Modals/Components/ModalUploadRoomImage.jsx@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 903 bytes
Line 
1import styles from "../EntranceModal/EntranceModal.module.css";
2import React, { useRef } from "react";
3
4export default function ModalUploadRoomImage() {
5 const fileInputRef = useRef(null);
6
7 const handleClick = () => {
8 fileInputRef.current.click();
9 };
10
11 return (
12 <div className={styles.formGroup}>
13 <label htmlFor="name">Room Image</label>
14 <div className={styles.customFileInput}>
15 <button
16 type="button"
17 className={styles.uploadButton}
18 onClick={handleClick}
19 >
20 Upload Image
21 </button>
22 <input
23 type="file"
24 accept="image/*"
25 ref={fileInputRef}
26 style={{ display: "none" }}
27 />
28 </div>
29 </div>
30 );
31}
Note: See TracBrowser for help on using the repository browser.