| 1 |
import Button from './button'; |
| 2 |
|
| 3 |
import './add-new-button.scss'; |
| 4 |
|
| 5 |
export default class AddNewButton extends Button { |
| 6 |
getClassName() { |
| 7 |
let className = this.props.className; |
| 8 |
|
| 9 |
if ( this.props.size ) { |
| 10 |
className += ' eps-add-new-button--' + this.props.size; |
| 11 |
} |
| 12 |
|
| 13 |
return className; |
| 14 |
} |
| 15 |
|
| 16 |
static propTypes = { |
| 17 |
...Button.propTypes, |
| 18 |
text: PropTypes.string, |
| 19 |
size: PropTypes.string, |
| 20 |
}; |
| 21 |
|
| 22 |
static defaultProps = { |
| 23 |
...Button.defaultProps, |
| 24 |
className: 'eps-add-new-button', |
| 25 |
text: __( 'Add New', 'elementor-pro' ), |
| 26 |
icon: 'eicon-plus', |
| 27 |
}; |
| 28 |
} |
| 29 |
|