8000 fix(NotificationTray): Fix a copy/paste comment issue and type import · tabler/tabler-react@96d9d18 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

Commit 96d9d18

Browse files
committed
fix(NotificationTray): Fix a copy/paste comment issue and type import
1 parent 84613df commit 96d9d18

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

example/src/SiteWrapper.react.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,14 @@ import {
1212
RouterContextProvider,
1313
} from "tabler-react";
1414

15+
import type { NotificationProps } from "tabler-react";
16+
1517
type Props = {|
1618
+children: React.Node,
1719
|};
1820

1921
type State = {|
20-
notificationsObjects: Array<{
21-
unread: boolean,
22-
avatarURL: string,
23-
message: React.Node,
24-
time: string,
25-
}>,
22+
notificationsObjects: Array<NotificationProps>,
2623
|};
2724

2825
type subNavItem = {|

src/components/Notification/Notification.react.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ export type Props = {|
1717
*/
1818
+time?: string,
1919
/**
20-
* The time displayed within the Notification
20+
* Indicate the notification as unread
2121
*/
2222
+unread?: boolean,
2323
|};
2424

2525
/**
2626
* An individual Notification made up of an Avatar alongside some text and the time
2727
*/
28-
function Notification({ avatarURL, message, time }: Props): React.Node {
28+
function Notification({ avatarURL, message, time, unread }: Props): React.Node {
2929
return (
3030
<React.Fragment>
3131
{avatarURL && (

src/components/Notification/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// @flow
22

33
import Notification from "./Notification.react";
4+
import type Props from "./Notification.react";
45

56
export { Notification as default };
7+
export type { Props as NotificationProps };

src/components/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// @flow
22

3+
import type NotificationProps from "./Notification";
4+
export type { NotificationProps };
5+
36
export { default as AccountDropdown } from "./AccountDropdown";
47
export { default as Alert } from "./Alert";
58
export { default as Avatar } from "./Avatar";

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export type { Selection as SelectionEvents } from "./flow";
1616
export type { Touch as TouchEvents } from "./flow";
1717
export type { UserInterface as UIEvents } from "./flow";
1818
export type { Wheel as WheelEvents } from "./flow";
19+
export type { NotificationProps } from "./components";
1920

2021
export {
2122
default as RouterContextProvider,

0 commit comments

Comments
 (0)
0