Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
chrome-web-share
Advanced tools
A lightweight React Share Button for mobile web with web share api integration, native intent support and fallback
A lightweight React share button for mobile web with Web Share API integration, native intent support and modal fallback.
npm install chrome-web-share --save
yarn add chrome-web-share
JSX
import ShareBtn from 'chrome-web-share';
<ShareBtn
shareUrl={url}
disabled={['whatsApp']]
shareText={text}
className='my-class-name'
buttonText='Share Profile'
/>
CSS
@import "chrome-web-share/dist/ShareBtn";
prop | default | description |
---|---|---|
shouldCloseOnEscape | false | Whether or not the fallback modal should close when the user hits the escape key on desktop |
disabled | [] | An array of button names to be disabled |
className | '' | Custom classname, you can style your button with this |
fbAppId | '' | Required if you are planning on sharing to Facebook |
fbDisplayType | 'touch' | The type of share window that will be launched to support different devices. E.g. mobile, tablet, or desktop. |
shareUrl | '' | The URL you want to share |
shareMessage | '' | The Text before the URL (E.g. Hey checkout this awesome thing I'm sharing!!) |
buttonText | Share | The text that will appear for the share button |
onButtonClick | () => {} | A callback function when the share button gets clicked |
onCopySuccess | () => {} | A callback function that fires when the user has copied some text, also contains the text |
sharedBy | (medium) => {console.log('shared via ', medium)} | A callback function when user clicks on any share medium from share modal |
Used for disabling a button with the
disabled
prop.
Can also be imported using the included util. E.g.
import { BUTTON_TYPES } from 'chrome-web-share'
git clone https://github.com/martinwheeler/chrome-web-share
cd chrome-web-share
yarn install
yarn storybook
Open an issue before opening a PR.
MIT
FAQs
A lightweight React Share Button for mobile web with web share api integration, native intent support and fallback
The npm package chrome-web-share receives a total of 0 weekly downloads. As such, chrome-web-share popularity was classified as not popular.
We found that chrome-web-share demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.