This package has been deprecated

Author message:

This package has been renamed to @ta-interaktiv/react-polymorphic-share-buttons. Please update your dependencies. Thank you!

ta-react-polymorphic-share-buttons

1.0.2 • Public • Published

Polymorphic Sharing Buttons

Renders a collection of social sharing buttons, accessing the Newsnet API to get the relevant data of the defined article.

Installation

yarn add ta-react-polymorphic-share-buttons

Usage

import PolymorphicShareButtons from 'ta-react-polymorphic-share-buttons';

//...

class YourComponent extends React.Component {
  render() {

    return (
      <PolymorphicShareButtons 
          articleID='34511213'
          hashtags={['TAGrafik', 'ddj']}
          displayType='horizontal icons'/>
    )
  }
}

API – 1.0

Props

Property Type Required Default Description
articleID string yes The article ID of the link article.
displayType One of 'horizontal icons' or 'vertical buttons' no 'vertical buttons' How the links are rendered. Currently supported: Stacked buttons or horizontal icons with share count.
inverted bool no false Used when icon list is displayed on dark backgrounds.
hashtags [string] no Array of strings to be used as hashtags when sharing.

Remarks

Fallback

In case the article with the given ID can't be found, the component will fall back to sensible defaults and still provide sharing buttons.

Display Type

Currently available values:

  • 'horizontal icons'
  • 'vertical buttons'

Dependencies (4)

Dev Dependencies (12)

Package Sidebar

Install

npm i ta-react-polymorphic-share-buttons

Weekly Downloads

0

Version

1.0.2

License

ISC

Last publish

Collaborators

  • xeophin