Skip to content

Commit ec8f869

Browse files
authored
(Image) Fix documentation for onLoad event. (#2964)
* - (Image) Fix documentation for onLoad event. * - (Image) Prettier.
1 parent 7ab3a75 commit ec8f869

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

docs/image.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,11 @@ Invoked on mount and on layout changes.
315315

316316
Invoked when load completes successfully.
317317

318-
| Type |
319-
| ------------------------------------------------ |
320-
| ([ImageLoadEvent](image#imageloadevent)) => void |
318+
**Example:** `onLoad={({nativeEvent: {source: {width, height}}}) => setImageRealSize({width, height})}`
319+
320+
| Type |
321+
| ----------------------------------------------------------------- |
322+
| ({ nativeEvent: [ImageLoadEvent](image#imageloadevent) }) => void |
321323

322324
---
323325

@@ -572,6 +574,14 @@ Object returned in the `onLoad` callback.
572574

573575
**Properties:**
574576

577+
| Name | Type | Description |
578+
| ------ | ------ | ----------------------------------- |
579+
| source | object | The [source object](#source-object) |
580+
581+
#### Source Object
582+
583+
**Properties:**
584+
575585
| Name | Type | Description |
576586
| ------ | ------ | ------------------------------------------------------------ |
577587
| width | number | The width of loaded image. |

0 commit comments

Comments
 (0)