import React from 'react';

import { Wrapper, Message, Action } from './styled';

type Props = {
  message: string;
  appearance?: 'default';
  action?: React.ReactNode;
};

const Toasts : React.FunctionComponent<Props> = ({
  message,
  appearance = 'default',
  action,
}) => {
  return (
    <Wrapper appearance={appearance}>
      <Message>{message}</Message>
      {action ? <Action>{action}</Action> : null}
    </Wrapper>
  );
};

export default Toasts;
