JSPM

social-sharing-component

1.0.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 1
    • Score
      100M100P100Q21802F
    • License MIT

    React component for custom social sharing buttons

    Package Exports

    • social-sharing-component

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (social-sharing-component) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    as-social-sharing

    Lightweight social sharing buttons for your site. Heavily inspired by sharingbuttons.io. SVG icons from flaticon.com.

    Installation

    npm install --save as-social-sharing

    Usage

    import SocialSharing from 'as-social-sharing'
    <SocialSharing
        media={['facebook', 'twitter']}
        size="small"
    />

    Available props

    |---------------|-------------------|-------------------------------------------------------------------|

    Prop Type Values
    media string "all"
    "popular" // facebook, twitter, pinterest, linkedin, reddit
    =OR= "messenger" // whatsapp, telegram, fb-messenger, skype, wechat
    array array of media names, i.e.: ['facebook', 'twitter']
    --------------- ------------------- -------------------------------------------------------------------
    text string custom text to share
    --------------- ------------------- -------------------------------------------------------------------
    url string custom url to share
    --------------- ------------------- -------------------------------------------------------------------
    size string "small", "medium", "large"
    --------------- ------------------- -------------------------------------------------------------------
    corners string "circle", "rounded", "square"
    --------------- ------------------- -------------------------------------------------------------------

    Default prop values

    media = [''] text = "" url = "" size = "small" corners = "circle"

    Available social media names

    facebook twitter tumblr e-mail pinterest linkedin reddit xing whatsapp hackernews vk telegram fb-messenger skype pocket wechat

    Changing the size of the buttons

    All of the sizes are in em units. So, to change the size of the buttons simply change the font-size property of .social-sharing-button class in your CSS.