Skip to content

Commit bb753de

Browse files
authored
Merge pull request nativescript-vue#322 from bundyo/patch-1
Add some docs for font protocol icons
2 parents 5bfe1dc + eb9e379 commit bb753de

File tree

1 file changed

+11
-3
lines changed
  • content/docs/en/elements/components

1 file changed

+11
-3
lines changed

content/docs/en/elements/components/image.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Image
33
apiRef: https://docs.nativescript.org/api-reference/classes/_ui_image_.image
4-
contributors: [MisterBrownRSA, rigor789, ikoevska]
4+
contributors: [MisterBrownRSA, rigor789, ikoevska, bundyo]
55
---
66

77
`<Image>` is a UI component that shows an image from an [ImageSource](https://docs.nativescript.org/api-reference/modules/_image_source_) or from a URL.
@@ -32,13 +32,21 @@ contributors: [MisterBrownRSA, rigor789, ikoevska]
3232
<Image src="data:Image/png;base64,iVBORw..." stretch="none" />
3333
```
3434

35+
#### Displaying an image with a font icon in {N} 6.2+
36+
37+
In NativeScript-Vue, `.decode` is required for parsing properties that have HTML entities in them.
38+
39+
```html
40+
<Image src.decode="font://&#xf004;" class="fas" />
41+
```
42+
3543
[> screenshots for=Image <]
3644

3745
## Props
3846

3947
| Name | Type | Description |
4048
|------|------|-------------|
41-
| `src` | `String` or [`ImageSource`](https://docs.nativescript.org/api-reference/modules/_image_source_) | Gets or sets the source of the image as a URL or an image source.
49+
| `src` | `String` or [`ImageSource`](https://docs.nativescript.org/api-reference/modules/_image_source_) | Gets or sets the source of the image as a URL or an image source. If you use the new font:// icon protocol in {N} 6.2, make sure you add .decode to the name of the property - e.g. `src.decode="font://&#xf004;"`
4250
|`imageSource` | [`ImageSource`](https://docs.nativescript.org/api-reference/modules/_image_source_) | Gets or sets the image source of the image.
4351
| `tintColor` | `Color` | (Style property) Sets a color to tint template images.
4452
| `stretch` | `Stretch` | (Style property) Gets or sets the way the image is resized to fill its allocated space.<br/>Valid values: `none`, `aspectFill`, `aspectFit`, or `fill`.<br/>For more information, see [Stretch](https://docs.nativescript.org/api-reference/modules/_ui_enums_.stretch).
@@ -48,4 +56,4 @@ contributors: [MisterBrownRSA, rigor789, ikoevska]
4856

4957
| Android | iOS |
5058
|---------|-----|
51-
| [`android.widget.ImageView`](https://developer.android.com/reference/android/widget/ImageView.html) | [`UIImageView`](https://developer.apple.com/documentation/uikit/uiimageview)
59+
| [`android.widget.ImageView`](https://developer.android.com/reference/android/widget/ImageView.html) | [`UIImageView`](https://developer.apple.com/documentation/uikit/uiimageview)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy