Open florisdipt opened 4 years ago
I had the same issue. It would be great if this was updated as without it, the ability to set default images (at least) is broken.
I worked around it, however, by creating a local types.lib.d.ts and pasting this:
declare module "react-images-upload" {
interface Props {
className?: string
fileContainerStyle?: object
onChange?: (files: File[], pictures: string[]) => void
buttonClassName?: string
buttonStyles?: object
withPreview?: boolean
accept?: string
name?: string
withIcon?: boolean
buttonText?: string
withLabel?: boolean
label?: string
labelStyles?: object
labelClass?: string
imgExtension?: string[]
maxFileSize?: number
fileSizeError?: string
fileTypeError?: string
errorClass?: string
errorStyle?: object
singleImage?: boolean
style?: object
defaultImages?: string[]
}
export default class ReactImageUploadComponent extends Component<Props> { }
}
I installed the package as suggested in the readme but im missing/mismatching some of the typings. When i do a manual paste all is well. however this is not convenient for other members in my team or deploying. https://github.com/JakeHartnell/react-images-upload/blob/master/src/component/index.d.ts Was last updated 2 months ago the NPM was last updated 3 months ago https://www.npmjs.com/package/react-images-upload/v/1.2.8 Please re release. Thank you for your time.