Skip to content

Commit

Permalink
feat(Notifications): add qa prop
Browse files Browse the repository at this point in the history
  • Loading branch information
kirill committed Sep 11, 2024
1 parent e00e9fc commit bffb646
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
13 changes: 10 additions & 3 deletions src/components/FilePreview/FilePreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@ import {
TextAlignLeft as TextIcon,
Filmstrip as VideoIcon,
} from '@gravity-ui/icons';
import {Icon, IconData, Text, useActionHandlers, useMobile, useUniqId} from '@gravity-ui/uikit';
import {
Icon,
IconData,
QAProps,
Text,
useActionHandlers,
useMobile,
useUniqId,
} from '@gravity-ui/uikit';

import {block} from '../utils/cn';

Expand All @@ -36,9 +44,8 @@ const FILE_ICON: Record<FileType, IconData> = {
table: TableIcon,
};

export interface FilePreviewProps {
export interface FilePreviewProps extends QAProps {
className?: string;
qa?: string;

file: File;
imageSrc?: string;
Expand Down
5 changes: 2 additions & 3 deletions src/components/Notification/definitions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ButtonProps, IconData} from '@gravity-ui/uikit';
import {ButtonProps, IconData, QAProps} from '@gravity-ui/uikit';

export type NotificationTheme = 'success' | 'info' | 'warning' | 'danger';

Expand Down Expand Up @@ -40,11 +40,10 @@ export type NotificationProps = {
};

export type NotificationActionProps = {
qa?: string;
view?: ButtonProps['view'];
icon?: IconData;
text: string;
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
href?: string;
target?: '_blank';
};
} & QAProps;
6 changes: 3 additions & 3 deletions src/components/Notifications/definitions.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {QAProps} from '@gravity-ui/uikit';

import {NotificationActionProps, NotificationProps} from '../Notification/definitions';

export type NotificationsActionProps = NotificationActionProps;

export type NotificationsProps = {
qa?: string;

title?: React.ReactNode;
actions?: React.ReactNode;

Expand All @@ -23,4 +23,4 @@ export type NotificationsProps = {
emptyImage?: React.ReactNode;

swipeThreshold?: number;
};
} & QAProps;

0 comments on commit bffb646

Please sign in to comment.