mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Add two additional types for React Image Crop (#37317)
* Add additional types to ReactCropProps * Update contributor list
This commit is contained in:
parent
1026305052
commit
fcdddfe6d8
3
types/react-image-crop/index.d.ts
vendored
3
types/react-image-crop/index.d.ts
vendored
@ -4,6 +4,7 @@
|
||||
// Elias Chaaya <https://github.com/chaaya>
|
||||
// Søren Englund <https://github.com/englund0110>
|
||||
// Jonathan Guo <https://github.com/JonathanGuo>
|
||||
// Lewis Monteith <https://github.com/lemonJS>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
@ -49,6 +50,8 @@ declare namespace ReactCrop {
|
||||
locked?: boolean;
|
||||
renderComponent?: ReactNode;
|
||||
renderSelectionAddon?: (state: any) => ReactNode;
|
||||
ruleOfThirds?: boolean;
|
||||
circularCrop?: boolean;
|
||||
}
|
||||
|
||||
function makeAspectCrop(crop: Crop, imageWidth: number, imageHeight: number): Crop;
|
||||
|
||||
@ -121,6 +121,8 @@ class CompleteTest extends React.Component<{}, TestState> {
|
||||
onImageError: this.onImageError,
|
||||
className: 'my-cropper',
|
||||
locked: false,
|
||||
ruleOfThirds: false,
|
||||
circularCrop: false,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -144,6 +144,8 @@ class CompleteTest extends React.Component<{}, TestState> {
|
||||
className="my-cropper"
|
||||
locked={false}
|
||||
renderComponent={<div></div>}
|
||||
ruleOfThirds={false}
|
||||
circularCrop={false}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user