PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 2.13.1
GiveWP – Donation Plugin and Fundraising Platform v2.13.1
4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 All 253 releases
give / src / Views / Components / Button / index.js
index.js
29 lines 558 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import PropTypes from 'prop-types';
2 import classNames from 'classnames';
3
4 import styles from './style.module.scss';
5
6 const Button = ( { children, onClick, icon, ...rest } ) => {
7 const classes = classNames( {
8 [ styles.button ]: true,
9 [ styles.icon ]: icon,
10 } );
11
12 return (
13 <button className={ classes } onClick={ onClick } { ...rest }>
14 { children }
15 </button>
16 );
17 };
18
19 Button.propTypes = {
20 // Button children
21 children: PropTypes.node,
22 // Fired on button click
23 onClick: PropTypes.func,
24 // Icon
25 icon: PropTypes.bool,
26 };
27
28 export default Button;
29