notificare-react-preview-components 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![GitHub release](https://img.shields.io/github/v/release/notificare/notificare-react-preview-components)](https://github.com/notificare/notificare-react-preview-components/releases)
6
6
  [![License](https://img.shields.io/github/license/notificare/notificare-react-preview-components)](https://github.com/notificare/notificare-react-preview-components/blob/main/LICENSE)
7
7
 
8
- The **Notificare React Preview Components** consists of a collection of React components that allows you to visualize how a Notificare Push Notification, In-App Message (*coming soon...*) or Wallet Pass (*coming soon...*) will appear in a user's device.
8
+ The **Notificare React Preview Components** consists of a collection of React components that allows you to visualize how a Notificare push notification, in-app message or wallet pass (*coming soon...*) will appear in a user's device.
9
9
 
10
10
  # Table of contents
11
11
 
@@ -13,10 +13,16 @@ The **Notificare React Preview Components** consists of a collection of React co
13
13
  - [Installation](#installation)
14
14
  - [Getting Started](#getting-started)
15
15
  - [Theming](#theming)
16
+ - [Localisation](#localisation)
16
17
 
17
18
  ## Features
18
19
 
19
- **Push Notifications**: Easily preview how a Notificare push notification will appear across various platforms and devices. With very intuitive UI controls, you can seamlessly switch between different preview variants to see how it looks like in various platforms and form-factors.
20
+ **Push notifications**: Easily preview how a Notificare push notification will appear across various platforms and devices. With very intuitive UI controls, you can seamlessly switch between different preview variants to see how it looks like in various platforms and form-factors.
21
+
22
+ **In-app messages**: See how a Notificare in-app message will appear on a mobile device — whether it’s a card, banner, or full-screen view.
23
+
24
+ **Push onboarding**: Visualize how the Push Onboarding UI will appear when your application uses a managed push onboarding flow.
25
+
20
26
 
21
27
  ## Installation
22
28
 
@@ -26,13 +32,17 @@ Install the library through NPM with the following command:
26
32
  npm install notificare-react-preview-components
27
33
  ```
28
34
 
29
- ## Getting Started
35
+ ## Requesting a service key
36
+
37
+ Before you can take advantage of the library's full potential, you'll need to request a service key. This key is required for authentication and access to certain features such as previewing push notifications. [Learn how to request a service key](./docs/requesting-a-service-key.md).
38
+
39
+ ## Getting started
30
40
 
31
41
  Getting up and running with this component library is quick and easy. Each component is designed to be modular and flexible, so you can integrate them seamlessly into your existing React application. Whether you’re building something small or scaling up a larger project, the process is the same: simply import the components you need and place them wherever they make the most sense in your UI.
32
42
 
33
43
  Below are basic examples for each component to show how they work. Be sure to check the documentation for each component to explore available props and customization options.
34
44
 
35
- ### Push Notifications
45
+ ### Push notifications
36
46
 
37
47
  A push notification preview can be generated through the `NotificareNotificationPreview` component.
38
48
 
@@ -50,7 +60,43 @@ export default function NotificationComposer() {
50
60
  }
51
61
  ```
52
62
 
53
- Check the component [documentation](https://github.com/notificare/notificare-react-preview-components/blob/main/docs/push.md) for more information.
63
+ Check the component [documentation](./docs/push.md) for more information.
64
+
65
+ ### In-app messages
66
+
67
+ An in-app message preview can be generated through the `NotificareInAppMessagePreview` component.
68
+
69
+ ```tsx
70
+ import { NotificareInAppMessagePreview } from 'notificare-react-preview-components';
71
+
72
+ export default function InAppMessageComposer() {
73
+ return (
74
+ <NotificareInAppMessagePreview
75
+ inAppMessage={...}
76
+ />
77
+ )
78
+ }
79
+ ```
80
+
81
+ Check the component [documentation](docs/in-app-messaging.md) for more information.
82
+
83
+ ### Push Onboarding
84
+
85
+ A push onboarding preview can be generated through the `NotificarePushOnboardingPreview` component.
86
+
87
+ ```tsx
88
+ import { NotificarePushOnboardingPreview } from 'notificare-react-preview-components';
89
+
90
+ export default function PushOnboardingComposer() {
91
+ return (
92
+ <NotificarePushOnboardingPreview
93
+ applicationInfo={...}
94
+ />
95
+ )
96
+ }
97
+ ```
98
+
99
+ Check the component [documentation](docs/push-onboarding.md) for more information.
54
100
 
55
101
  ## Theming
56
102
 
@@ -61,8 +107,12 @@ We’ve also prioritized style isolation to prevent conflicts. By using scoped,
61
107
  For example, to adjust the size of the loading animation, you can simply add the following CSS:
62
108
 
63
109
  ```css
64
- .notificare .notificare__push__webshot-loading-icon-svg {
110
+ .notificare .notificare__loading__icon {
65
111
  width: 48px;
66
112
  height: 48px;
67
113
  }
68
114
  ```
115
+
116
+ ## Localisation
117
+
118
+ Regardless of the preview component you're using, you can select which language will be used in the UI controls and in the preview itself. Components will be automatically translated based on the chosen language, if default translations are available. Furthermore, you can also provide fully customizable translations, allowing you to personalize components to your liking.<br><br>Check each component's documentation for more details on how to implement this.