├── LICENSE ├── NavigatorShare.vue ├── README.md └── package.json /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Gabriel Bibiano 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /NavigatorShare.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 54 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-navigator-share 2 | A Vue component to use native sharing mechanism of the device as part of the Web Share API. 3 | 4 | Support only https and mobile browser 5 | Demo 6 | 7 | ## Instalation 8 | ```sh 9 | $ npm install --save vue-navigator-share 10 | ``` 11 | 12 | ## Properties 13 | 14 | | prop | type | description | required | 15 | | ------ | ------ | ------ | ------ | 16 | | on-error | Function | callback on error | false | 17 | | on-success | Function | callback on success | false | 18 | | url | String | url to share | true | 19 | | title | String | title to share | false | 20 | | text | String | text to share | false | 21 | 22 | ## Usage 23 | 24 | ```HTML 25 | 32 | ``` 33 | 34 | ```javascript 35 | 51 | ``` 52 | 53 | ## Example 54 | 55 | ```HTML 56 | 63 | ``` 64 | 65 | 66 | ```javascript 67 | 98 | ``` 99 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-navigator-share", 3 | "version": "1.0.2", 4 | "description": "A Vue component to use native sharing mechanism of the device as part of the Web Share API.", 5 | "main": "NavigatorShare.vue", 6 | "scripts": { 7 | "test": "" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/GabrielBibiano/vue-navigator-share.git" 12 | }, 13 | "keywords": [ 14 | "vue", 15 | "VueJs", 16 | "share", 17 | "navigator.share", 18 | "navigator" 19 | ], 20 | "author": "Gabriel Bibiano", 21 | "license": "MIT", 22 | "bugs": { 23 | "url": "https://github.com/GabrielBibiano/vue-navigator-share/issues" 24 | }, 25 | "homepage": "https://github.com/GabrielBibiano/vue-navigator-share#readme" 26 | } --------------------------------------------------------------------------------