0.1.1 • Published 7 years ago

material-ui-share v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Material Share

JavaScript Style Guide Build Status Greenkeeper badge

Example Alt text

With chrome 61 on mobile the Web Share Api was deployed. You can now invoke the native share action inside your browser. You can read more about here

other browsers will follow

To use the Web Share Api:

  • you must be served over HTTPS
  • you can also share any URL, not just URLs under your website's current scope: and you may also share text without a URL
  • you should feature-detect it in case it's not available on your users' platform (e.g., via navigator.share !== undefined)

Installation

npm i --save material-ui-share

Usage

import Share from 'material-ui-share'

// ...
render() {
  return(
    <Share
        title='This is a cool title'
        text='Oh you want some text for this share component'
        url='https://developers.google.com/web/updates/2016/09/navigator-share'
    />
  )
}

SearchBar Properties

NameTypeDefaultDescription
titlestringSets title for content to share.
textstringSets text for content to share.
urlstringSets url for content to share.
onFailurefuncFired when share action returns an error.
onSuccessfuncFired when share action succeeded.
styleobjectOverride the inline-styles of the root element.

* required property

License

The files included in this repository are licensed under the MIT license.