Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
fix(NotificationTray): Fix a copy/paste comment issue and type import
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsoftware committed Dec 3, 2018
1 parent 84613df commit 96d9d18
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
9 changes: 3 additions & 6 deletions example/src/SiteWrapper.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@ import {
RouterContextProvider,
} from "tabler-react";

import type { NotificationProps } from "tabler-react";

type Props = {|
+children: React.Node,
|};

type State = {|
notificationsObjects: Array<{
unread: boolean,
avatarURL: string,
message: React.Node,
time: string,
}>,
notificationsObjects: Array<NotificationProps>,
|};

type subNavItem = {|
Expand Down
4 changes: 2 additions & 2 deletions src/components/Notification/Notification.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ export type Props = {|
*/
+time?: string,
/**
* The time displayed within the Notification
* Indicate the notification as unread
*/
+unread?: boolean,
|};

/**
* An individual Notification made up of an Avatar alongside some text and the time
*/
function Notification({ avatarURL, message, time }: Props): React.Node {
function Notification({ avatarURL, message, time, unread }: Props): React.Node {
return (
<React.Fragment>
{avatarURL && (
Expand Down
2 changes: 2 additions & 0 deletions src/components/Notification/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// @flow

import Notification from "./Notification.react";
import type Props from "./Notification.react";

export { Notification as default };
export type { Props as NotificationProps };
3 changes: 3 additions & 0 deletions src/components/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// @flow

import type NotificationProps from "./Notification";
export type { NotificationProps };

export { default as AccountDropdown } from "./AccountDropdown";
export { default as Alert } from "./Alert";
export { default as Avatar } from "./Avatar";
Expand Down
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export type { Selection as SelectionEvents } from "./flow";
export type { Touch as TouchEvents } from "./flow";
export type { UserInterface as UIEvents } from "./flow";
export type { Wheel as WheelEvents } from "./flow";
export type { NotificationProps } from "./components";

export {
default as RouterContextProvider,
Expand Down

0 comments on commit 96d9d18

Please sign in to comment.