3.0.4 • Published 1 year ago

react-shareit v3.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

react-shareit

  • Share your content on social media.

✨ Features

  • 🍃 Only ~6kb gzipped and no external dependencies
  • 🌀 Uses React Portal
  • ✌ Written w/ TypeScript

🔧 Installation

npm i react-shareit    # npm
yarn add react-shareit # yarn
``

## 📦 Example

```tsx
import React, { useState } from "react";
import { ReactShare } from "react-shareit";

const Example = () => {
  return (
    <>
      <ReactShare
        data={{
          text: "Text",
          url: "https://blog.com/single-blog",
          title: "Title",
        }}
        onClick={() => console.log("shared successfully!")}
      >
        <button>Share 🔗</button>
      </ReactShare>
    </>
  );
};

export default Example;

👀 Props

PropDescriptionTypeDefault
dataShare Object{text, url, title}{text: "", url: currentURL, title: "Share"}
sitessitesstring[]all platforms (see list below for key list)
closeTexttranslate closestringlocalise close text
onClickcallback on sucessful share
disableNativedisables native sharebooleanfalse

🌎 Sites

  • facebook
  • twitter
  • whatsapp
  • reddit
  • telegram
  • linkedin
  • mail
  • copy (Copy to Clipboard)
  • vk
  • okru

📜 License

MIT © Zahid Khan

3.0.4

1 year ago

3.0.3

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago