Alurkerja v1.0.0@Beta

PendingUpload

Base

Typescript
import { PendingUpload } from 'alurkerja-ui'
export const PendingUploadPage = () => {
	return(
		<PendingUpload />
	)
}

multiple()

Typescript
import { PendingUpload } from 'alurkerja-ui'
export const PendingUploadPage = () => {
	return(
		<PendingUpload multiple />
	)
}

defaultValue()

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()

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()

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()

Typescript
import { PendingUpload } from 'alurkerja-ui'
export const PendingUploadPage = () => {
	return(
		<PendingUpload defaultValue={dummy} fetchBeforeLoad type="image" />
	)
}