| 1 |
import BaseButton from '../ui/molecules/button'; |
| 2 |
|
| 3 |
export default class Button extends BaseButton { |
| 4 |
static defaultProps = Object.assign( {} /* Clone */, BaseButton.defaultProps, { |
| 5 |
hideText: true, |
| 6 |
includeHeaderBtnClass: true, |
| 7 |
} ); |
| 8 |
|
| 9 |
getCssId() { |
| 10 |
return `eps-app-header-btn-` + super.getCssId(); |
| 11 |
} |
| 12 |
|
| 13 |
getClassName() { |
| 14 |
// Avoid using the 'eps-app__header-btn' class to make sure it is not override custom styles. |
| 15 |
if ( ! this.props.includeHeaderBtnClass ) { |
| 16 |
return super.getClassName(); |
| 17 |
} |
| 18 |
|
| 19 |
return `eps-app__header-btn ` + super.getClassName(); |
| 20 |
} |
| 21 |
} |
| 22 |
|