New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

share-react

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

share-react

Support the sharing of some Chinese applications

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

share-react

Install npm

    npm install share-react

Install yarn

    yarn add share-react

Use

    import {
        Douban,
        Facebook,
        Google,
        Qq,
        Qzone,        
        Twitter,
        Weibo,
        Linkedin,
        TencentWB,        
        BaiduPostBar,
        Email,
    } from 'share-react';

    <Douban        
        style={{}}
        data={{}}
        isExitWindows={}
        className={}
         disable={}
        windowHeight={}
        windowWidth={}
        children={}
        otherProps={{}}
        customWindow={}        
        closeWindow={}
    >
        <Children /> // 为任意node 推荐使用这种方式定制内部组件
    </Douban>

props

属性类型默认值描述
isExitWindowsBooleantrue控制窗口状态 (开
classNameString随机窗口的名称
styleobject{}分享盒子的样式
disableBooleanfalse分享链接是否可以点击
windowHeightNumber400窗口的高度
windowWidthNumber600窗口的宽度
childrennode子节点 (建议使用 )
otherPropsobject其他自定义props属性

props method

方法类型描述
customWindowfun自定义窗口 [arg为url]
closeWindowfun关闭窗口发生的事件 [arg为窗口实例]

node props

组件props
Douban [豆瓣]href: 链接 name: 名字 text: 文本 image: 图片
Facebook [facebook]url: 链接
Google [谷歌]url: 链接
Qq [qq好友]url: 链接 title: 标题 desc: 描述 source: '' summary: 摘要 pics: 图片
Qzone [qq空间]url: 链接 title: 标题 desc: 描述 summary: 摘要
Twitter [推特]url: 链接 text: 文本 via: 经由
Weibo [微博]url: 链接 text: 文本 pics: 图片 appkey:
Linkedin [点点]url: 链接 title: 标题 summary: 摘要 source: armin:
TencentWB [腾讯微博]url: 链接 title: 标题 pic: 图片 c: a:
BaiduPostBar [百度贴吧]url: 链接 title: 标题
Email [邮件]subject: 项目名称 body: 项目 内容
    data = {{
        url: ''
        ......
    }}

about wechat

    由于微信是生成二维码,为了不引入多余的库 可以使用如下库
    qrcode.react(https://github.com/zpao/qrcode.react)

License

MIT

Illustration

share-react 主要应用于一些中国应用的分享功能

参考于

share.js

react-share

Keywords

react

FAQs

Package last updated on 10 May 2018

Did you know?

Socket

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.

Install

Related posts