azamatsmith / react-social-bar

Configurable social media sharing bar for React

Home Page:https://azamatsmith.github.io/react-social-bar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status codecov

react-social-bar

Configurable Social Media Sharing Bar


react-social-demo

Install

Yarn: yarn add react-social-bar

Npm: npm install react-social-bar

Get Started

This project was bootstrapped using create-react-app and react-storybook

The easiest way to get started is to clone this repo and run yarn start

Adding react-social-bar to your app

Once react-social-bar is installed. Import it into your file
`import SocialBar from 'react-social-bar';

  return (
    <SocialBar config={ configObj } />
  );

Configuration Options

Options

  const configObj = {
    description: string (required),
    domain: string (required),
    handleClick: function (required),
    hideBelowWidth: number (optional),
    mediaUrl: string (optional),
    productName: string (required),
    twitterHandle: string (optional)
  }

Example Options

  const configObj = {
    description: 'NameSquash: An easy way to name your next side project or business',
    domain: 'https://namesquash.com',
    handleClick: (social) => console.log('clicked:', social),
    hideBelowWidth: 1038,
    mediaUrl: 'https://namesquash.com/images/namesquashapp.png',
    productName: 'NameSquash',
    twitterHandle: 'namesquash'
  }

About

Configurable social media sharing bar for React

https://azamatsmith.github.io/react-social-bar


Languages

Language:JavaScript 85.8%Language:CSS 9.4%Language:HTML 4.8%