You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/declarative-customization/formatting-syntax-reference.md
+38-1Lines changed: 38 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Formatting syntax reference
3
3
description: Formatting syntax reference
4
-
ms.date: 02/09/2022
4
+
ms.date: 02/22/2022
5
5
ms.localizationpriority: high
6
6
---
7
7
@@ -19,9 +19,22 @@ Specifies the type of element to create. Valid elements include:
19
19
- path
20
20
- button
21
21
- p
22
+
-[filepreview](#filepreview)
22
23
23
24
Any other value will result in an error.
24
25
26
+
### filepreview
27
+
28
+
Use the special elmType `filepreview` in conjunction with the `src` attribute set to [`@thumbnail.<Size>`](#thumbnails) to view thumbnails for files in your document libary.
29
+
If the thumbnail loads successfully, a small [brand type icon](https://developer.microsoft.com/en-us/fluentui#/styles/web/office-brand-icons) is visible on the bottom left. If the thumbanil fails to load (or if the file type doesn't support thumbnails), a [file type icon](https://developer.microsoft.com/en-us/fluentui#/styles/web/file-type-icons) is shown instead.
30
+
31
+
```json
32
+
"elmType": "filepreview",
33
+
"attributes": {
34
+
"src": "@thumbnail.medium"
35
+
}
36
+
```
37
+
25
38
## txtContent
26
39
27
40
An optional property that specifies the text content of the element specified by `elmType`. The value of this property can either be a string (including special strings) or an Expression object.
@@ -384,6 +397,30 @@ Adds the field editor for the referenced column.
384
397
"txtContent": "[$FieldName]"
385
398
}
386
399
```
400
+
## filePreviewProps
401
+
402
+
An optional property, that allows overriding the default styles of file type icon and brand type icon in `filepreview` elmType.
403
+
404
+
-`fileTypeIconClass` and `brandTypeIconClass` can be used to provide CSS class names to the file type icon and the brand type icon elements respectively.
405
+
406
+
-`fileTypeIconStyle` and `brandTypeIconStyle` can be used to provide [styles](#style) to the file type icon and the brand type icon respectively. These styles will take precedence over the same styles coming from the CSS classes provided by the above 2 properties.
0 commit comments