@capacitor/share 5.0.3-nightly-20230516T150818.0 → 5.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +22 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -26,6 +26,28 @@ await Share.share({
26
26
  url: 'http://ionicframework.com/',
27
27
  dialogTitle: 'Share with buddies',
28
28
  });
29
+
30
+ // Share text only
31
+ await Share.share({
32
+ text: 'Really awesome thing you need to see right meow',
33
+ });
34
+
35
+ // Share url only
36
+ await Share.share({
37
+ url: 'http://ionicframework.com/',
38
+ });
39
+
40
+ // Share local file using url parameter
41
+ const photo = await Camera.getPhoto(options);
42
+ await Share.share({
43
+ url: photo.path,
44
+ });
45
+
46
+ // Share multiple files using files parameter
47
+ const { photos } = await Camera.pickImages(options);
48
+ await Share.share({
49
+ files: photos.map(photo => photo.path!),
50
+ });
29
51
  ```
30
52
 
31
53
  Each platform uses a different set of fields, but you should supply them all.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/share",
3
- "version": "5.0.3-nightly-20230516T150818.0",
3
+ "version": "5.0.4",
4
4
  "description": "The Share API provides methods for sharing content in any sharing-enabled apps the user may have installed.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",