-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
- Loading branch information
There are no files selected for viewing
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
export * from './constants/events'; | ||
export * from './constants/file'; | ||
export * from './constants/images'; | ||
export * from './file-upload-with-preview'; | ||
export * from './constants/style'; | ||
export * from './constants/text'; | ||
export * from './types/events'; | ||
export * from './types/options'; | ||
export * from './file-upload-with-preview'; | ||
//# sourceMappingURL=index.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
export interface Text { | ||
/** | ||
* Browse button text | ||
* | ||
* @default "Browse" | ||
*/ | ||
browse?: string; | ||
/** | ||
* Placeholder text | ||
* | ||
* @default "Choose file..." | ||
*/ | ||
chooseFile?: string; | ||
/** | ||
* Main input label text | ||
* | ||
* @default "Upload" | ||
*/ | ||
label?: string; | ||
/** | ||
* Count descriptor text. Defaults to `${ n } files selected`. | ||
* | ||
* @default "files selected" | ||
*/ | ||
selectedCount?: string; | ||
} | ||
export interface Images { | ||
/** | ||
* Background image for image grid | ||
* | ||
* @default DEFAULT_BACKGROUND_IMAGE | ||
*/ | ||
backgroundImage?: string; | ||
/** | ||
* Placeholder image | ||
* | ||
* @default DEFAULT_BASE_IMAGE | ||
*/ | ||
baseImage?: string; | ||
/** | ||
* Alternate file upload image | ||
* | ||
* @default DEFAULT_SUCCESS_FILE_ALT_IMAGE | ||
*/ | ||
successFileAltImage?: string; | ||
/** | ||
* PDF upload image | ||
* | ||
* @default DEFAULT_SUCCESS_PDF_IMAGE | ||
*/ | ||
successPdfImage?: string; | ||
/** | ||
* Video upload image | ||
* | ||
* @default DEFAULT_SUCCESS_VIDEO_IMAGE | ||
*/ | ||
successVideoImage?: string; | ||
} | ||
export type PresetFiles = string[]; | ||
/** | ||
* Options to customize the library | ||
*/ | ||
export interface Options { | ||
/** | ||
* Type of files to accept in your input | ||
* | ||
* @default '*' | ||
*/ | ||
accept?: HTMLInputElement['accept']; | ||
/** | ||
* Configurable images for the library | ||
*/ | ||
images?: Images; | ||
/** | ||
* Set a maximum number of files you'd like the component to deal with. Must be `> 0` if set. By default there is no limit. | ||
* | ||
* @default 0 | ||
*/ | ||
maxFileCount?: number; | ||
/** | ||
* Set to `true` if you want to allow the user to selected multiple images. Will use grid view in the image preview if set. | ||
* | ||
* @default false | ||
*/ | ||
multiple?: boolean; | ||
/** | ||
* Provide an array of image paths to be automatically uploaded and displayed on page load (can be images hosted on server or URLs) | ||
* | ||
* @default [] | ||
*/ | ||
presetFiles?: PresetFiles; | ||
/** | ||
* Show a delete button on images in the grid | ||
* | ||
* @default true | ||
*/ | ||
showDeleteButtonOnImages?: boolean; | ||
/** | ||
* Configurable text for the library | ||
*/ | ||
text?: Text; | ||
} | ||
export type RequiredOptions = Required<Options> & { | ||
images: Required<Images>; | ||
text: Required<Text>; | ||
}; | ||
//# sourceMappingURL=options.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.