🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

react-share-selected-text

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-share-selected-text

a react share selected text component

latest
Source
npmnpm
Version
1.0.9
Version published
Maintainers
1
Created
Source

react-share-selected-text

Build Status

Introduction

  • A component that can share selected text.

Install

npm install react-share-selected-text
yarn add react-share-selected-text

Demo

在线 Demo

Usage

import SharedSelectText from 'react-share-selected-text';
import 'react-share-selected-text/lib/index.min.css';

const App = () => (
  <SharedSelectText buttons={[ icon:'wechat' ]}>
    here is some article texts
  </SharedSelectText>
);

ShareSelectedProps:属性如下

属性说明类型默认值
timeout浮动框出现的延迟时间number300
buttons设置浮动框上面的按钮IButtons[]
buttonsRender浮动框自定义渲染,优先级低于 buttonsJSX.Element
gridSize按钮格子的大小number30
buttonsClassName按钮区域自定义 classstring
onShow当组件可见时的钩子函数Function
onHide当组件不可见时的钩子函数Function

ButtonProps 属性如下:

属性说明类型默认值
icon展示图标,内置有wechat,twitter,facebook,weibostringJSX.Element
onClick图标点击事件Function

Keywords

react

FAQs

Package last updated on 06 Jun 2020

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