1.0.3 • Published 5 years ago

react-ripple-button v1.0.3

Weekly downloads
2
License
MIT
Repository
-
Last release
5 years ago

react-ripple-button

a ripple-button component for React that from Ripple buttons https://codepen.io/jh3y/pen/EKGXEY

Installation

$ npm install react-ripple-button --save
$ yarn add react-ripple-button

Usage

import RippleBtn from "react-ripple-button";

class App extends React.Component {
  render() {
    const onClick = () => {
      console.log(565);
    };

    return <RippleBtn btnClassName="test" text="test" onClick={onClick} />;
  }
}

export default App;

//css
.test {
  background-color: red !important;
  width: 300px;
  height: 150px;
}

Properties

  static propTypes = {
    btnClassName: PropTypes.string,      //Custom component name
    btnStyle: PropTypes.object,          //Custom component style
    onClick: PropTypes.func.isRequired,
    text: PropTypes.string.isRequired    //Custom component content
  };

  static defaultProps = {
    btnClassName: "",
    btnStyle: {}
  };

License

MIT

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago