1.0.2 • Published 7 years ago

ta-react-polymorphic-share-buttons v1.0.2

Weekly downloads
1
License
ISC
Repository
gitlab
Last release
7 years ago

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

PropertyTypeRequiredDefaultDescription
articleIDstringyesThe article ID of the link article.
displayTypeOne of 'horizontal icons' or 'vertical buttons'no'vertical buttons'How the links are rendered. Currently supported: Stacked buttons or horizontal icons with share count.
invertedboolnofalseUsed when icon list is displayed on dark backgrounds.
hashtags[string]noArray 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'
1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago