import React, { useEffect } from "react";

import { Button } from '../components/Button'

import { toast } from '../components/ToastManager'

export const ToastExample = ({ content, type, duration }) => {

    function createToast(){
        toast.show({
            content: content,
            type: type,
            duration: duration
        })
    }

    return (
        <div>
            <h3>Toaster Box</h3>
            <Button onClick={createToast}>Create toast</Button>
        </div>
    );
};