@easyops-cn/rc-trigger
v2.2.1
Published
base abstract trigger component for react
Downloads
4
Readme
@rc-component/trigger
React Trigger Component
Install
Usage
Include the default styling and then:
import React from 'react';
import ReactDOM from 'react-dom';
import Trigger from '@rc-component/trigger';
ReactDOM.render((
<Trigger
action={['click']}
popup={<span>popup</span>}
popupAlign={{
points: ['tl', 'bl'],
offset: [0, 3]
}}
>
<a href='#'>hover</a>
</Trigger>
), container);
Compatibility
| IE / Edge | Firefox | Chrome | Safari | Electron | | --- | --- | --- | --- | --- | | IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
Example
http://localhost:9001
Development
npm install
npm start
API
props
Test Case
npm test
npm run coverage
open coverage/ dir
License
rc-trigger is released under the MIT license.