mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-27 00:30:09 +02:00
hide input control
This commit is contained in:
@@ -110,7 +110,7 @@ const Assets = () => {
|
|||||||
|
|
||||||
const [isDropTarget, setIsDropTarget] = useState(false);
|
const [isDropTarget, setIsDropTarget] = useState(false);
|
||||||
const handleDragDropEvent = e => {
|
const handleDragDropEvent = e => {
|
||||||
console.log('drag event, ', e.type);
|
console.log('drag event, ', e.type, e.target.dataset.dragTarget);
|
||||||
if (e.type === 'dragover') {
|
if (e.type === 'dragover') {
|
||||||
// required for drop to work
|
// required for drop to work
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -157,6 +157,7 @@ const Assets = () => {
|
|||||||
onDragLeave={handleDragDropEvent}
|
onDragLeave={handleDragDropEvent}
|
||||||
onDragOver={handleDragDropEvent}
|
onDragOver={handleDragDropEvent}
|
||||||
onDrop={handleDrop}
|
onDrop={handleDrop}
|
||||||
|
data-drag-target
|
||||||
>
|
>
|
||||||
<HStack gap={1} align="center">
|
<HStack gap={1} align="center">
|
||||||
<h1>
|
<h1>
|
||||||
@@ -175,18 +176,20 @@ const Assets = () => {
|
|||||||
{isUploading ? <div class="asset-manager__progress-bar"></div> : null}
|
{isUploading ? <div class="asset-manager__progress-bar"></div> : null}
|
||||||
|
|
||||||
<div style={{ visibility: isUploading ? 'hidden' : 'visible' }}>
|
<div style={{ visibility: isUploading ? 'hidden' : 'visible' }}>
|
||||||
<VStack gap={1} align="center">
|
<VStack gap={1} align="stretch">
|
||||||
<Text tag="p" align="center">
|
<label style="background: #00000001">
|
||||||
Drop files here to upload
|
<Text tag="p" align="center">
|
||||||
</Text>
|
Drop files here to upload
|
||||||
<Text tag="p" appearance="secondary" align="center">
|
</Text>
|
||||||
File should be max 300KB in size
|
<Text tag="p" appearance="secondary" align="center">
|
||||||
</Text>
|
File should be max 300KB in size
|
||||||
<input
|
</Text>
|
||||||
type="file"
|
<input
|
||||||
onChange={handleFileUpload}
|
type="file"
|
||||||
style={{ marginTop: 'auto' }}
|
onChange={handleFileUpload}
|
||||||
/>
|
style={{ marginTop: 'auto', display: 'none' }}
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
</VStack>
|
</VStack>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user