Skip to content

Commit

Permalink
make the whole 'Upload 3DStreet JSON File' button clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentfretin committed Sep 10, 2024
1 parent 42de768 commit 5608c42
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions src/editor/components/modals/ScenesModal/ScenesModal.component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,25 +223,24 @@ const ScenesModal = ({ isOpen, onClose, initialTab = 'owner', delay }) => {
<Button
leadingIcon={<Upload24Icon />}
className={styles.uploadBtn}
style={{ position: 'relative' }}
>
<label
Upload 3DStreet JSON File
<input
type="file"
onChange={(e) => {
fileJSON(e);
onClose(); // Close the modal
}}
style={{
display: 'block',
width: '100%',
position: 'absolute',
inset: 0,
opacity: 0,
fontSize: 0,
cursor: 'pointer'
}}
>
<input
type="file"
onChange={(e) => {
fileJSON(e);
onClose(); // Close the modal
}}
style={{ display: 'none' }}
accept=".js, .json, .txt"
/>
Upload 3DStreet JSON File
</label>
accept=".js, .json, .txt"
/>
</Button>
</div>
</div>
Expand Down

0 comments on commit 5608c42

Please sign in to comment.