mirror of
https://github.com/billsonnn/nitro-react.git
synced 2025-01-19 05:46:27 +01:00
Update notifications
This commit is contained in:
parent
34e3b3d7e3
commit
f7c9735849
@ -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(() =>
|
||||||
|
@ -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>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user