|
24 | 24 | APNSProviderParams
|
25 | 25 | } from './store';
|
26 | 26 | import TooltipPopover from './tooltipPopover.svelte';
|
27 |
| - import { Icon, Tooltip, Upload, Layout, Typography } from '@appwrite.io/pink-svelte'; |
28 |
| - import { IconInfo } from '@appwrite.io/pink-icons-svelte'; |
| 27 | + import { Upload, Layout, Typography } from '@appwrite.io/pink-svelte'; |
29 | 28 | import { InvalidFileType, removeFile } from '$lib/helpers/files';
|
30 | 29 | import { addNotification } from '$lib/stores/notifications';
|
31 | 30 |
|
|
122 | 121 | {:else if input.type === 'file'}
|
123 | 122 | <Upload.Dropzone
|
124 | 123 | on:invalid={handleInvalid}
|
125 |
| - extensions={['json']} |
| 124 | + extensions={input.allowedFileExtensions} |
126 | 125 | bind:files={files[input.name]}
|
127 | 126 | maxSize={10000000}
|
128 | 127 | required={!input.optional}>
|
129 |
| - <Layout.Stack alignItems="center" gap="s"> |
130 |
| - <Layout.Stack alignItems="center" gap="s"> |
131 |
| - <Layout.Stack alignItems="center" justifyContent="center" direction="row" gap="s"> |
132 |
| - <Typography.Text variant="l-500"> |
133 |
| - Drag and drop service account JSON here or click to upload |
134 |
| - </Typography.Text> |
135 |
| - <Tooltip> |
136 |
| - <Layout.Stack alignItems="center" justifyContent="center" inline> |
137 |
| - <Icon icon={IconInfo} size="s" /> |
138 |
| - </Layout.Stack> |
139 |
| - <svelte:fragment slot="tooltip">Only .json files allowed</svelte:fragment> |
140 |
| - </Tooltip> |
141 |
| - </Layout.Stack> |
142 |
| - <Typography.Caption variant="400">Max file size 10MB</Typography.Caption> |
143 |
| - </Layout.Stack> |
| 128 | + <Layout.Stack alignItems="center" justifyContent="center" direction="row" gap="xxs"> |
| 129 | + <Typography.Text variant="l-500"> |
| 130 | + Drag and drop your {input.label} here or click to upload |
| 131 | + </Typography.Text> |
| 132 | + <TooltipPopover {popover} {popoverProps} tooltip={input.tooltip} /> |
144 | 133 | </Layout.Stack>
|
145 | 134 | </Upload.Dropzone>
|
146 | 135 | {#if files[input.name]?.length}
|
|
0 commit comments