2016-03-22 00:25:23 +01:00
|
|
|
import React from 'react';
|
2016-03-26 06:41:24 +01:00
|
|
|
import SilverStripeComponent from 'silverstripe-component.js';
|
2016-03-22 00:25:23 +01:00
|
|
|
|
|
|
|
class FormActionComponent extends SilverStripeComponent {
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<button type={this.props.type} className={this.props.className}>
|
|
|
|
{this.props.label}
|
|
|
|
</button>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
FormActionComponent.propTypes = {
|
|
|
|
className: React.PropTypes.string,
|
|
|
|
label: React.PropTypes.string.isRequired,
|
|
|
|
type: React.PropTypes.string
|
|
|
|
};
|
|
|
|
|
|
|
|
FormActionComponent.defaultProps = {
|
|
|
|
className: 'btn btn-primary',
|
|
|
|
type: 'button'
|
|
|
|
};
|
|
|
|
|
|
|
|
export default FormActionComponent;
|