import { FC } from 'react';

import Box from '@material-hu/mui/Box';

import Button from '@material-hu/components/design-system/Buttons/Button';

export type ViewResultsProps = {
  handleViewResults: () => void;
  textButton: string;
};

export const ViewResults: FC<ViewResultsProps> = props => {
  const { handleViewResults, textButton } = props;

  return (
    <Box textAlign="center">
      <Button
        variant="contained"
        sx={{ mb: 6, mt: 2, width: '20%' }}
        size="large"
        color="primary"
        onClick={handleViewResults}
      >
        {textButton}
      </Button>
    </Box>
  );
};

export default ViewResults;
