PendingUpload
Base
Klik untuk mengunggah, atau drag file
Typescript
import { PendingUpload } from 'alurkerja-ui'
export const PendingUploadPage = () => {
return(
<PendingUpload />
)
}
multiple()
Klik untuk mengunggah, atau drag file
Typescript
import { PendingUpload } from 'alurkerja-ui'
export const PendingUploadPage = () => {
return(
<PendingUpload multiple />
)
}
defaultValue()
Klik untuk mengunggah, atau drag file
Typescript
import { PendingUpload } from 'alurkerja-ui'
export const PendingUploadPage = () => {
const dummy = [
{
id: '99826655-5aa9-4735-8805-ddd298817d86'
name: 'SK Libur Idul Adha 2023.pdf',
original_url: 'https://minio.cloud.javan.co.id/kpk-sppt/public/files/2023-06/99826655-5aa9-4735-8805-ddd298817d86-SK%20Libur%20Idul%20Adha%202023.pdf',
size: 10000
}
]
return(
<PendingUpload defaultValue={dummy} />
)
}
disabled()
Klik untuk mengunggah, atau drag file
Typescript
import { PendingUpload } from 'alurkerja-ui'
export const PendingUploadPage = () => {
const dummy = [
{
id: '99826655-5aa9-4735-8805-ddd298817d86'
name: 'SK Libur Idul Adha 2023.pdf',
original_url: 'https://minio.cloud.javan.co.id/kpk-sppt/public/files/2023-06/99826655-5aa9-4735-8805-ddd298817d86-SK%20Libur%20Idul%20Adha%202023.pdf',
size: 10000
}
]
return(
<PendingUpload defaultValue={dummy} disabled />
)
}
onChange()
Klik untuk mengunggah, atau drag file
Typescript
import { PendingUpload } from 'alurkerja-ui'
export const PendingUploadPage = () => {
const onUploadChange = (file: any) => {
if (file.length > 0) {
alert(JSON.stringify(file))
}
}
return(
<PendingUpload onChange={onUploadChange} />
)
}
fetchBeforeLoad()
Klik untuk mengunggah, atau drag file
Typescript
import { PendingUpload } from 'alurkerja-ui'
export const PendingUploadPage = () => {
return(
<PendingUpload defaultValue={dummy} fetchBeforeLoad type="image" />
)
}