import * as React from 'react';

import SubmitButton, { SubmitButtonProps } from '../../../containers/submit-button/SubmitButton';
import { buttonStyle } from './submitButtonOne.style';

class SubmitButtonOne extends React.PureComponent<SubmitButtonProps, {}> {
	render() {
		return (
			<SubmitButton
				{...this.props}
				render={() => {
					return (
						<button
							data-automation={this.props.automationName}
							type="submit"
							className={buttonStyle(this.props.palette)}
							data-gtm={this.props.gtmId}
							onClick={this.props.onSubmit}
						>
							{this.props.translator(this.props.text)}
						</button>
					);
				}}
			/>
		);
	}
}

export default SubmitButtonOne;
