-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(buildteams): ✨ Showcase Image Editing
- Loading branch information
1 parent
c62e42c
commit 7b66f7e
Showing
6 changed files
with
169 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { DropzoneProps, IMAGE_MIME_TYPE, Dropzone as MDropzone } from '@mantine/dropzone'; | ||
import { Group, Image, Text, rem } from '@mantine/core'; | ||
import { IconPhoto, IconUpload, IconX } from '@tabler/icons-react'; | ||
|
||
interface ExtendDropzone extends DropzoneProps {} | ||
|
||
export function Dropzone(props: ExtendDropzone) { | ||
return ( | ||
<MDropzone maxSize={3 * 1024 ** 2} accept={IMAGE_MIME_TYPE} {...props}> | ||
<Group justify="center" gap="xl" mih={220} style={{ pointerEvents: 'none' }}> | ||
<MDropzone.Accept> | ||
<IconUpload style={{ width: rem(52), height: rem(52), color: 'var(--mantine-color-blue-6)' }} stroke={1.5} /> | ||
</MDropzone.Accept> | ||
<MDropzone.Reject> | ||
<IconX style={{ width: rem(52), height: rem(52), color: 'var(--mantine-color-red-6)' }} stroke={1.5} /> | ||
</MDropzone.Reject> | ||
<MDropzone.Idle> | ||
<IconPhoto style={{ width: rem(52), height: rem(52), color: 'var(--mantine-color-dimmed)' }} stroke={1.5} /> | ||
</MDropzone.Idle> | ||
|
||
<div> | ||
<Text size="xl" inline> | ||
Drag images here or click to select files | ||
</Text> | ||
<Text size="sm" c="dimmed" inline mt={7}> | ||
File size should not exceed 5mb | ||
</Text> | ||
</div> | ||
</Group> | ||
</MDropzone> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters