File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
website/docs/api/interfaces Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,28 @@ title: "ImageProps"
44sidebar_label : " ImageProps"
55---
66
7+ The Image component provides the ability to render images. It is based on
8+ [ NodeGui's QPixmap] ( https://docs.nodegui.org/docs/api/generated/classes/qpixmap ) .
9+ ## Example
10+ ``` javascript
11+ import React from " react" ;
12+ import { Renderer , Image , Window } from " @nodegui/react-nodegui" ;
13+ import { AspectRatioMode } from " @nodegui/nodegui" ;
14+ const App = () => {
15+ return (
16+ < Window >
17+ < Image
18+ aspectRatioMode= {AspectRatioMode .KeepAspectRatio }
19+ size= {{ height: 200 , width: 150 }}
20+ src= " https://place-hold.it/200x150"
21+ >< / Image>
22+ < / Window >
23+ );
24+ };
25+ Renderer .render (< App / > );
26+
27+ ```
28+
729## Hierarchy
830
931 ↳ [ TextProps] ( textprops.md )
You can’t perform that action at this time.
0 commit comments