import * as React from 'react';
import { errorMessageStyle } from './errorMessage.style';

const ErrorMessage = (props: { errorMessage: string | React.ReactNode; palette: any }) => {
	return (
		<p className={errorMessageStyle(props.palette)} role="alert">
			{props.errorMessage}
		</p>
	);
};

export default ErrorMessage;
