mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
Add two additional types for React Image Crop (#37317)
* Add additional types to ReactCropProps * Update contributor list
This commit is contained in:
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}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user