1.0.1 • Published 4 years ago

react-feedback-x v1.0.1

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

react-feedback

In the development, mouse hover and click often need to give different feedback to improve the user experience, so react feedback is generated.

Installation

npm install --save react-feedback

Development

npm install
npm start

Usage

import Feedback from 'react-feedback';
import 'custome.css';

<Feedback
    hoverActiveClass="feedback-hover"
    clickActiveClass="feedback-click"
    disabled={false}
    >
    <div onClick={() => console.log('clicked')}  style={{border:'solid red 1px'}}>
        <p>hello hello hello hello hello113</p>
    </div>
</Feedback>

<Feedback
    hoverActiveClass="feedback-hover"
    clickActiveClass="feedback-click"
    disabled={false}
    >
    <button>react feedback button </button>
</Feedback>

props

namedescriptiontypedefault
hoverActiveClassclassName applied to child when hoverdstring
clickActiveClassclassName applied to child when clickedstring
disabledDon't allow styles workbooleanfalse

Test

npm run test

License

react-feedback is released under the MIT license.