sub-rc-trigger
v1.0.3
Published
base abstract trigger component for react
Downloads
21
Maintainers
Readme
rc-trigger
React Trigger Component
Browser Support
| | | | | | | --- | --- | --- | --- | --- | | IE 8+ ✔ | Chrome 31.0+ ✔ | Firefox 31.0+ ✔ | Opera 30.0+ ✔ | Safari 7.0+ ✔ |
Development
npm install
npm start
Example
http://localhost:8200/examples/
online example: http://react-component.github.io/trigger/examples/
Feature
- supported on IE 8+, Chrome, Firefox, and Safari
install
Usage
Include the default styling and then:
import React from 'react';
import ReactDOM from 'react-dom';
import Trigger from 'rc-trigger';
ReactDOM.render((
<Trigger
action={['click']}
popup={<span>popup</span>}
popupAlign={{
points: ['tl', 'bl'],
offset: [0, 3]
}}
>
<a href='#'>hover</a>
</Trigger>
), container);
API
props
Test Case
npm test
npm run chrome-test
Coverage
npm run coverage
open coverage/ dir
License
rc-trigger is released under the MIT license.