feat(core): add local ai onboarding dialog (#6600)

This commit is contained in:
CatsJuice
2024-04-18 15:48:19 +00:00
parent 28f2ff24b9
commit 7970d9b8c9
6 changed files with 172 additions and 24 deletions

View File

@@ -30,6 +30,7 @@ export const NotificationCard = ({ notification }: NotificationCardProps) => {
footer,
alignMessage = 'title',
onDismiss,
rootAttrs,
} = notification;
const onActionClicked = useCallback(() => {
@@ -49,7 +50,8 @@ export const NotificationCard = ({ notification }: NotificationCardProps) => {
[styles.iconColor]: getIconColor(style, theme, iconColor),
})}
data-with-icon={icon ? '' : undefined}
className={styles.card}
{...rootAttrs}
className={clsx(styles.card, rootAttrs?.className)}
>
{thumb}
<div className={styles.cardInner}>

View File

@@ -1,4 +1,4 @@
import type { ReactNode } from 'react';
import type { HTMLAttributes, ReactNode } from 'react';
import type { ButtonProps } from '../button';
@@ -23,6 +23,8 @@ export interface Notification {
autoClose?: boolean;
};
rootAttrs?: HTMLAttributes<HTMLDivElement>;
// custom slots
thumb?: ReactNode;
title?: ReactNode;