forked from react-cropper/react-cropper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request react-cropper#502 from react-cropper/feat/cropperj…
…s-v1.5.10 feat: update cropperjs to v.1.5.10 and slight refactor
- Loading branch information
Showing
6 changed files
with
40 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export {ReactCropper as Cropper} from './react-cropper'; | ||
export {ReactCropper as default} from './react-cropper'; | ||
export {ReactCropperProps} from './react-cropper'; | ||
export type {ReactCropperProps, ReactCropperElement} from './react-cropper'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,27 @@ | ||
import React from 'react'; | ||
import Cropper from 'cropperjs'; | ||
interface ReactCropperProps | ||
extends Cropper.Options, | ||
Omit<React.HTMLProps<HTMLImageElement>, 'data' | 'ref' | 'crossOrigin'> { | ||
crossOrigin?: '' | 'anonymous' | 'use-credentials' | undefined; | ||
on?: (eventName: string, callback: () => void | Promise<void>) => void | Promise<void>; | ||
interface ReactCropperElement extends HTMLImageElement { | ||
cropper: Cropper; | ||
} | ||
interface ReactCropperDefaultOptions { | ||
scaleX?: number; | ||
scaleY?: number; | ||
enable?: boolean; | ||
zoomTo?: number; | ||
rotateTo?: number; | ||
} | ||
interface ReactCropperProps | ||
extends ReactCropperDefaultOptions, | ||
Cropper.Options<HTMLImageElement>, | ||
Omit<React.HTMLProps<HTMLImageElement>, 'data' | 'ref' | 'crossOrigin'> { | ||
crossOrigin?: '' | 'anonymous' | 'use-credentials' | undefined; | ||
on?: (eventName: string, callback: () => void | Promise<void>) => void | Promise<void>; | ||
onInitialized?: (instance: Cropper) => void | Promise<void>; | ||
} | ||
declare const ReactCropper: React.ForwardRefExoticComponent<ReactCropperProps & React.RefAttributes<HTMLImageElement>>; | ||
declare const applyDefaultOptions: (cropper: Cropper, options?: ReactCropperDefaultOptions) => void; | ||
declare const ReactCropper: React.ForwardRefExoticComponent< | ||
ReactCropperProps & React.RefAttributes<HTMLImageElement | ReactCropperElement> | ||
>; | ||
export {ReactCropper as Cropper}; | ||
export {ReactCropper as default}; | ||
export {ReactCropperProps}; | ||
export {ReactCropperProps, ReactCropperElement}; |