Skip to content

Commit

Permalink
Add missing goober setup
Browse files Browse the repository at this point in the history
  • Loading branch information
timolins committed Dec 24, 2020
1 parent aa3c0c6 commit b43caa1
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/components/toaster.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
import * as React from 'react';
import { CSSAttribute } from 'goober';
import { CSSAttribute, setup } from 'goober';
import CSS from 'csstype';

import { useToaster } from '../core/use-toaster';
import { ToastBar } from './toast-bar';
import { ToastPosition, DefaultToastOptions } from '../core/types';

interface ToasterProps {
position?: ToastPosition;
reverseOrder?: boolean;
containerStyle?: CSS.Properties;

toastOptions?: DefaultToastOptions;
}
setup(React.createElement);

const getPositionStyle = (
position: ToastPosition,
Expand Down Expand Up @@ -44,6 +38,14 @@ const getPositionStyle = (
};
};

interface ToasterProps {
position?: ToastPosition;
reverseOrder?: boolean;
containerStyle?: CSS.Properties;

toastOptions?: DefaultToastOptions;
}

export const Toaster: React.FC<ToasterProps> = ({
reverseOrder,
position = 'top-center',
Expand Down

0 comments on commit b43caa1

Please sign in to comment.