mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
28 lines
625 B
JavaScript
28 lines
625 B
JavaScript
|
import React from 'react';
|
||
|
import SilverStripeComponent from '../../SilverStripeComponent';
|
||
|
|
||
|
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;
|