@react-types/image
Advanced tools
Comparing version 3.0.0-alpha.1 to 3.0.0-nightly-086ad3115-240911
{ | ||
"name": "@react-types/image", | ||
"version": "3.0.0-alpha.1", | ||
"version": "3.0.0-nightly-086ad3115-240911", | ||
"description": "Spectrum UI components in React", | ||
@@ -9,9 +9,9 @@ "license": "Apache-2.0", | ||
"type": "git", | ||
"url": "https://github.com/adobe-private/react-spectrum-v3" | ||
"url": "https://github.com/adobe/react-spectrum" | ||
}, | ||
"dependencies": { | ||
"@react-types/shared": "^3.0.0-rc.2" | ||
"@react-types/shared": "^3.0.0-nightly-086ad3115-240911" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.8.0" | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" | ||
}, | ||
@@ -21,3 +21,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "207e6ee9076905c96638a7f81a367758872e1410" | ||
} | ||
"stableVersion": "3.4.3" | ||
} |
# @react-types/image | ||
This package is part of [react-spectrum](https://github.com/adobe-private/react-spectrum-v3). See the repo for more details. | ||
This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details. |
@@ -14,10 +14,25 @@ /* | ||
import {DOMProps, StyleProps} from '@react-types/shared'; | ||
import {ReactEventHandler} from 'react'; | ||
export interface ImageProps { | ||
loaded?: boolean, // not real, just makes ts happy for now | ||
isPlaceholder?: boolean, // same thing | ||
/** | ||
* The URL of the image. | ||
*/ | ||
src: string, | ||
/** | ||
* Text description of the image. | ||
*/ | ||
alt?: string, | ||
/** | ||
* Sets the Image [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) style. | ||
*/ | ||
objectFit?: any, // move to styleProps for images and type better | ||
src?: string, | ||
decorative?: boolean, | ||
alt?: string, | ||
/** | ||
* Called if an error occurs while loading or rendering an image, see [Image loading errors](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#image_loading_errors). | ||
*/ | ||
onError?: ReactEventHandler<HTMLImageElement>, | ||
/** | ||
* Called when the image has successfully loaded, see [load event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/load_event). | ||
*/ | ||
onLoad?: ReactEventHandler<HTMLImageElement> | ||
} | ||
@@ -28,5 +43,5 @@ | ||
* A slot to place the image in. | ||
* @default "image" | ||
* @default 'image' | ||
*/ | ||
slot?: string | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42
248
2335
5336
3
+ Addedreact@19.0.0(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedloose-envify@1.4.0(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedprop-types@15.8.1(transitive)
- Removedreact@16.14.0(transitive)
- Removedreact-is@16.13.1(transitive)