@trycourier/courier-ui-inbox
Version:
Inbox components for the Courier web UI
46 lines (45 loc) • 1.24 kB
TypeScript
import { InboxAction, InboxMessage } from '@trycourier/courier-js';
import { CourierInboxDatasetFilter } from './inbox-data-set';
export type CourierInboxHeaderFactoryProps = {
feeds: CourierInboxHeaderFeed[];
};
export type CourierInboxHeaderFeed = {
feedId: string;
title: string;
iconSVG?: string;
tabs: CourierInboxHeaderFeedTab[];
isSelected: boolean;
};
export type CourierInboxHeaderFeedTab = {
datasetId: string;
title: string;
unreadCount: number;
isSelected: boolean;
filter: CourierInboxDatasetFilter;
};
export type CourierInboxStateLoadingFactoryProps = {
datasetId: string;
};
export type CourierInboxStateEmptyFactoryProps = {
datasetId: string;
};
export type CourierInboxStateErrorFactoryProps = {
datasetId: string;
error: Error;
};
export type CourierInboxListItemFactoryProps = {
message: InboxMessage;
index: number;
};
export type CourierInboxListItemActionFactoryProps = {
message: InboxMessage;
action: InboxAction;
index: number;
};
export type CourierInboxPaginationItemFactoryProps = {
datasetId: string;
};
export type CourierInboxMenuButtonFactoryProps = {
totalUnreadCount: number;
feeds: CourierInboxHeaderFeed[];
};