Update notifications

This commit is contained in:
Bill 2022-03-14 06:53:49 -04:00
parent 34e3b3d7e3
commit f7c9735849
2 changed files with 9 additions and 7 deletions

View File

@ -11,7 +11,7 @@ export interface LayoutNotificationBubbleViewProps extends FlexProps
export const LayoutNotificationBubbleView: FC<LayoutNotificationBubbleViewProps> = props =>
{
const { fadesOut = false, timeoutMs = 8000, close = null, overflow='hidden', classNames = [], ...rest } = props;
const { fadesOut = true, timeoutMs = 8000, close = null, overflow = 'hidden', classNames = [], ...rest } = props;
const [ isVisible, setIsVisible ] = useState(false);
const getClassNames = useMemo(() =>

View File

@ -1,6 +1,6 @@
import { FC } from 'react';
import { NotificationConfirmItem } from '../../../../api';
import { LayoutNotificationAlertView, LayoutNotificationAlertViewProps } from '../../../../common';
import { Button, Flex, LayoutNotificationAlertView, LayoutNotificationAlertViewProps, Text } from '../../../../common';
export interface NotificationDefaultConfirmViewProps extends LayoutNotificationAlertViewProps
{
@ -28,11 +28,13 @@ export const NotificationDefaultConfirmView: FC<NotificationDefaultConfirmViewPr
return (
<LayoutNotificationAlertView title={ title } close={ close } { ...rest }>
{ message }
<div className="d-flex justify-content-between align-items-center">
<button type="button" className="btn btn-danger" onClick={ cancel }>{ cancelText }</button>
<button type="button" className="btn btn-primary" onClick={ confirm }>{ confirmText }</button>
</div>
<Flex grow center>
<Text>{ message }</Text>
</Flex>
<Flex gap={ 1 }>
<Button fullWidth variant="danger" onClick={ cancel }>{ cancelText }</Button>
<Button fullWidth onClick={ confirm }>{ confirmText }</Button>
</Flex>
</LayoutNotificationAlertView>
);
}