Back to Woocommerce

README

packages/js/components/src/image-upload/README.md

10.8.0-dev554 B
Original Source

ImageUpload

ImageUpload - Adds an upload area for selecting or uploading an image from the WordPress media gallery.

Usage

jsx
	<ImageUpload image={ image } onChange={ newImage => setState( { url: newImage } ) } />

Props

NameTypeDefaultDescription
imageObjectnullImage information containing media gallery id and image url
onChangeFunctionnullFunction to trigger when the selected image changes
classNameStringnullAdditional class name to style the component