Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
@ta-interaktiv/react-polymorphic-share-buttons
Advanced tools
Readme
Renders a collection of social sharing buttons, accessing the Newsnet API to get the relevant data of the defined article.
yarn add @ta-interaktiv/react-polymorphic-share-buttons
These share buttons can be provided with an article ID. They will then use the Newsnet API to gather the correct links and share counters.
Examples
import PolymorphicShareButtons from
'@ta-interaktiv/react-polymorphic-share-buttons'
class YourComponent extends React.Component {
render() {
return (
<PolymorphicShareButtons
articleID='34511213'
hashtags={['TAGrafik', 'ddj']}
displayType='horizontal icons'/>
)
}
}
Meta
Extends React.Component
Share buttons that are configured using the Newsnet API, using the article ID
Parameters
props
object
props.articleID
string The article ID of the main / link article
in the CD. Used to get the appropriate share URLs and counts.props.clickHandler
clickHandler? An action to execute when
the button is clicked. Defaults to a call to the share button counter
API endpoint.props.displayType
{VERTICAL_BUTTONS: string, HORIZONTAL_ICONS: string} The display type, either
horizontally aligned icons (with share counter) or vertically stacked
buttons. Defaults to vertical buttons. (optional, default VERTICAL_BUTTONS
)props.inverted
boolean Whether the list should be
displayed on a dark background. (optional, default false
)props.hashtags
Array<string>? A list of hashtags to tag the shared
content with. Facebook will only accept the first value, so make it
count.props.additionalFacebookShares
number? Manually add Facebook
shares in case some of them got lost due to changing the canonical URL.Enum states for the loading process.
The subdomain to use for the call to the Newsnet API.
The default click handler will call the share counting REST API upon clicking the buttons.
Type: Function
Parameters
articleID
string The ID of the article.community
community A community object, as provided by the
Newsnet APIevent
object The react event object.Returns void
FAQs
Renders a collection of social sharing buttons, accessing the Newsnet API to get the relevant data of the defined article.
The npm package @ta-interaktiv/react-polymorphic-share-buttons receives a total of 2 weekly downloads. As such, @ta-interaktiv/react-polymorphic-share-buttons popularity was classified as not popular.
We found that @ta-interaktiv/react-polymorphic-share-buttons demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.