├── src ├── components │ ├── Spinner │ │ ├── index.ts │ │ └── Spinner.tsx │ ├── EmptyFeed │ │ ├── index.ts │ │ ├── EmptyFeed.tsx │ │ └── styles.css │ ├── UnseenBadge │ │ ├── index.ts │ │ ├── styles.css │ │ └── UnseenBadge.tsx │ ├── KnockI18nProvider │ │ ├── index.ts │ │ └── KnockI18nProvider.tsx │ ├── NotificationIconButton │ │ ├── index.ts │ │ ├── styles.css │ │ └── NotificationIconButton.tsx │ ├── Button │ │ ├── index.ts │ │ ├── ButtonGroup.tsx │ │ ├── ButtonSpinner.tsx │ │ ├── Button.tsx │ │ └── styles.css │ ├── NotificationFeedPopover │ │ ├── index.ts │ │ ├── styles.css │ │ └── NotificationFeedPopover.tsx │ ├── NotificationCell │ │ ├── index.ts │ │ ├── Avatar.tsx │ │ ├── ArchiveButton.tsx │ │ ├── NotificationCell.tsx │ │ └── styles.css │ ├── KnockFeedProvider │ │ ├── index.ts │ │ ├── KnockFeedContainer.tsx │ │ ├── styles.css │ │ └── KnockFeedProvider.tsx │ ├── NotificationFeed │ │ ├── index.ts │ │ ├── Dropdown.tsx │ │ ├── MarkAsRead.tsx │ │ ├── NotificationFeedHeader.tsx │ │ ├── styles.css │ │ └── NotificationFeed.tsx │ └── Icons │ │ ├── index.ts │ │ ├── ChevronDown.tsx │ │ ├── CheckmarkCircle.tsx │ │ ├── Bell.tsx │ │ └── CloseCircle.tsx ├── constants.ts ├── hooks │ ├── index.ts │ ├── useAuthenticatedKnockClient.ts │ ├── useNotifications.ts │ ├── useTranslations.ts │ ├── useFeedSettings.ts │ ├── useComponentVisible.ts │ └── useOnBottomScroll.ts ├── i18n │ ├── languages │ │ ├── en.ts │ │ └── de.ts │ └── index.ts ├── index.ts ├── utils.ts ├── theme.css └── stories │ └── Feed.stories.tsx ├── utils.d.ts ├── NotificationFeed.png ├── NotificationFeed2.png ├── .storybook ├── preview.js └── main.js ├── .gitignore ├── .github └── workflows │ └── publish.yml ├── tsconfig.json ├── rollup.config.js ├── babel.config.js ├── LICENSE ├── package.json └── README.md /src/components/Spinner/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./Spinner"; 2 | -------------------------------------------------------------------------------- /src/components/EmptyFeed/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./EmptyFeed"; 2 | -------------------------------------------------------------------------------- /src/components/UnseenBadge/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./UnseenBadge"; 2 | -------------------------------------------------------------------------------- /src/components/KnockI18nProvider/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./KnockI18nProvider"; 2 | -------------------------------------------------------------------------------- /src/components/NotificationIconButton/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./NotificationIconButton"; 2 | -------------------------------------------------------------------------------- /utils.d.ts: -------------------------------------------------------------------------------- 1 | export declare function formatBadgeCount(count: number): string | number; 2 | -------------------------------------------------------------------------------- /src/components/Button/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./Button"; 2 | export * from "./ButtonGroup"; 3 | -------------------------------------------------------------------------------- /src/components/NotificationFeedPopover/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./NotificationFeedPopover"; 2 | -------------------------------------------------------------------------------- /NotificationFeed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knocklabs/react-notification-feed/HEAD/NotificationFeed.png -------------------------------------------------------------------------------- /NotificationFeed2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knocklabs/react-notification-feed/HEAD/NotificationFeed2.png -------------------------------------------------------------------------------- /src/components/NotificationCell/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./NotificationCell"; 2 | export * from "./Avatar"; 3 | -------------------------------------------------------------------------------- /src/components/KnockFeedProvider/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./KnockFeedProvider"; 2 | export * from "./KnockFeedContainer"; 3 | -------------------------------------------------------------------------------- /src/components/NotificationFeed/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./NotificationFeed"; 2 | export * from "./NotificationFeedHeader"; 3 | export * from "./MarkAsRead"; 4 | -------------------------------------------------------------------------------- /src/constants.ts: -------------------------------------------------------------------------------- 1 | export enum FilterStatus { 2 | All = "all", 3 | Read = "read", 4 | Unseen = "unseen", 5 | Unread = "unread", 6 | } 7 | 8 | export type ColorMode = "light" | "dark"; 9 | -------------------------------------------------------------------------------- /src/components/Button/ButtonGroup.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | import "./styles.css"; 4 | 5 | export const ButtonGroup: React.FC = ({ children }) => ( 6 |
{t("emptyFeedBody")}
15 |