1.0.6 • Published 6 years ago

preact-social v1.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

preact-social

A library of social sharing buttons for preact projects

Install

$ npm install --save preact-social

Usage

import { h } from 'preact';
import {FacebookShare, TwitterIcon} from 'preact-social';

// Share icon
<FacebookShare
  url={url}
  size={size}
  fill='#fff'
  background='#3B5998'
  circle
/>

// Renders only the icon
<TwitterIcon
  size={size}
  fill='#fff'
/>

DEMO

Supported Share Icons

Share IconProperties
FacebookShareurlsizefillbackgroundcircle
TwitterSharetexturlsizefillbackgroundcircle
WhatsAppSharetexturlsizefillbackgroundcircle
RedditShareurlsizefillbackgroundcircle
LinkedinSharetexturlsummarysourcesizefillbackgroundcircle
PinterestSharetexturlsizefillbackgroundcircle
TelegramSharetexturlsizefillbackgroundcircle
EmailSharetexturlsizefillbackgroundcircle

Properties

url

Type: String Default: none

size

Type: Integer Default: 32

The size attribute defines the size of the social icons.

fill

Type: Hex Default: #000

The fill attribute specifies the color of the icons.

background

Type: Hex Default: #000

The background attribute specifies the color of the icon background (parent element).

circle

Type: true Default: false

The circle attribute, when passed, renders the icons in a circular container.

License

MIT © Varun A P

Acknowledgements

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago