7ca9e691d4
* Migrate leaderboard tests to RTL. * Remove test of default prop value. * Migrate ReportSummary tests to RTL. * Migrate ActivityCard tests to RTL. * Migrate ActivityCardPlaceholder tests to RTL. * Migrate remaining ProductType tests to RTL. * Migrate Card tests to RTL. * Update RTL and user event packages. * Migrate Date tests to RTL. * Migrate D3Legend tests to RTL. * Migrate D3Base tests to RTL. * Migrate Gravatar tests to RTL. * Migrate ImageUpload tests to RTL. * Migrate ProductImage tests to RTL. * Migrate Rating tests to RTL. * Migrate Search tests to RTL. * Migrate Plugins tests to RTL. * Migrate SelectControl tests to RTL. * Migrate Timeline tests to RTL. Remove tests that inspect DOM since there are snapshots. * Migrate DismissModal tests to RTL. * Migrate SetupNotice tests to RTL. * Migrate WelcomeCard tests to RTL. * Fix setup error reason retrieval in ShippingBanner. * Migrate ShippingBanner tests to RTL. * Migrate RecommendedExtensions tests to RTL. * Migrate KnowledgeBase tests to RTL. * Rename enzyme setup file, modify to setup RTL. * No need to import jest-dom in test files. * Remove enzyme dependency. * Use snapshot for testing Leaderboard markup. * Switch from "not to be empty" to "be in the document". * No need to waitFor() recordEvent mock. * Be specific about clicking the "hide" button. * Use toBeVisible() instead of checking style property. |
||
---|---|---|
.. | ||
stories | ||
test | ||
README.md | ||
index.js | ||
style.scss |
README.md
ImageUpload
ImageUpload - Adds an upload area for selecting or uploading an image from the WordPress media gallery.
Usage
<ImageUpload image={ image } onChange={ newImage => setState( { url: newImage } ) } />
Props
Name | Type | Default | Description |
---|---|---|---|
image |
Object | null |
Image information containing media gallery id and image url |
onChange |
Function | null |
Function to trigger when the selected image changes |
className |
String | null |
Additional class name to style the component |