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 => 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 [ isVisible, setIsVisible ] = useState(false);
const getClassNames = useMemo(() => const getClassNames = useMemo(() =>

View File

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