From 8d82aa2124ec4495c445a30aee99371f9f648c61 Mon Sep 17 00:00:00 2001 From: DaneEveritt Date: Sun, 24 Jul 2022 18:59:20 -0400 Subject: [PATCH] Improve design of drag & drop overlay --- .../components/server/files/UploadButton.tsx | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/resources/scripts/components/server/files/UploadButton.tsx b/resources/scripts/components/server/files/UploadButton.tsx index ca50095f1..e5a1bd089 100644 --- a/resources/scripts/components/server/files/UploadButton.tsx +++ b/resources/scripts/components/server/files/UploadButton.tsx @@ -3,7 +3,6 @@ import getFileUploadUrl from '@/api/server/files/getFileUploadUrl'; import tw from 'twin.macro'; import { Button } from '@/components/elements/button/index'; import React, { useEffect, useRef, useState } from 'react'; -import styled from 'styled-components/macro'; import { ModalMask } from '@/components/elements/Modal'; import Fade from '@/components/elements/Fade'; import useEventListener from '@/plugins/useEventListener'; @@ -12,11 +11,7 @@ import useFileManagerSwr from '@/plugins/useFileManagerSwr'; import { ServerContext } from '@/state/server'; import { WithClassname } from '@/components/types'; import Portal from '@/components/elements/Portal'; - -const InnerContainer = styled.div` - max-width: 600px; - ${tw`bg-black w-full border-4 border-primary-500 border-dashed rounded p-10 mx-10`} -`; +import { CloudUploadIcon } from '@heroicons/react/outline'; function isFileOrDirectory(event: DragEvent): boolean { if (!event.dataTransfer?.types) { @@ -123,10 +118,17 @@ export default ({ className }: WithClassname) => { onFileSubmission(e.dataTransfer.files); }} > -
- -

Drag and drop files to upload.

-
+
+
+ +

+ Drag and drop files to upload. +

+