Add two additional types for React Image Crop (#37317)

* Add additional types to ReactCropProps

* Update contributor list
This commit is contained in:
lemonJS 2019-08-02 23:59:21 +01:00 committed by Jesse Trinity
parent 1026305052
commit fcdddfe6d8
3 changed files with 7 additions and 0 deletions

View File

@ -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;

View File

@ -121,6 +121,8 @@ class CompleteTest extends React.Component<{}, TestState> {
onImageError: this.onImageError,
className: 'my-cropper',
locked: false,
ruleOfThirds: false,
circularCrop: false,
});
}
}

View File

@ -144,6 +144,8 @@ class CompleteTest extends React.Component<{}, TestState> {
className="my-cropper"
locked={false}
renderComponent={<div></div>}
ruleOfThirds={false}
circularCrop={false}
/>
);
}