Skip to content

Commit 48046b1

Browse files
Add react component PushNotification
1 parent 563ca06 commit 48046b1

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { Card, CardHeader, Heading, CardBody, Text } from "@chakra-ui/react";
2+
import { PushNotification } from "../push-notification";
3+
4+
/**
5+
* A React component that displays a PushNotification's information in a card format.
6+
*
7+
* @returns A `Card` component containing PushNotification model as a `Heading` in the `CardHeader` and PushNotification name as a `Text` in the `CardBody`.
8+
*/
9+
export function PushNotification(param: PushNotificationOptions) {
10+
const {PushNotification} = param;
11+
return <Card>
12+
<CardHeader>
13+
<Heading>
14+
{
15+
PushNotification.title
16+
}
17+
</Heading>
18+
</CardHeader>
19+
<CardBody>
20+
<Text>
21+
{
22+
PushNotification.body
23+
}
24+
</Text>
25+
</CardBody>
26+
</Card>
27+
}
28+
29+
export interface PushNotificationOptions {
30+
/**
31+
* All PushNotification information
32+
*/
33+
PushNotification: PushNotification
34+
}

0 commit comments

Comments
 (0)