Skip to content

Commit e664b1a

Browse files
docs: Change heading sizes, update error code table
1 parent 13cbf60 commit e664b1a

File tree

1 file changed

+21
-22
lines changed

1 file changed

+21
-22
lines changed

README.md

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
2-
<H1>Siren React Inbox</H1>
1+
# Siren React Inbox
32

43
## Overview
54

65
The `@siren/react-inbox` sdk is a comprehensive and customizable React UI kit for displaying and managing notifications. This documentation provides comprehensive information on how to install, configure, and use the sdk effectively.
76

8-
### 1. Installation
7+
## 1. Installation
98

109
You can install the react sdk from npm
1110

@@ -22,8 +21,8 @@ yarn @siren/react-inbox
2221

2322
- React v16.8+
2423

25-
### 2. Configuration
26-
#### 2.1 Initialization
24+
## 2. Configuration
25+
### 2.1 Initialization
2726
Initialize the sdk with user token and recipient id. Wrap the provider around your App's root.
2827

2928
```js
@@ -37,7 +36,7 @@ const config = {
3736
<SirenProvider config={config}>{/* Your app components */}</SirenProvider>;
3837
```
3938

40-
#### 2.2 Configure notification inbox
39+
### 2.2 Configure notification inbox
4140
Once the provider is configured, next step is to configure the notification inbox
4241

4342
Inbox is a paginated list view for displaying notifications.
@@ -75,8 +74,8 @@ loadMoreComponent | Custom load more component | JSX Element | null |
7574
customErrorWindow | Custom error window | JSX Element | null |
7675
onError | Callback for handling errors | (error: SirenErrorType)=> void | null |
7776

78-
### 3. Customization
79-
#### 3.1 Themes
77+
## 3. Customization
78+
### 3.1 Themes
8079

8180
Here are the available theme options:
8281

@@ -131,7 +130,7 @@ type ThemeProps = {
131130
}
132131
};
133132
```
134-
#### 3.2 Style options
133+
### 3.2 Style options
135134

136135
Here are the custom style options for the notification inbox
137136

@@ -187,9 +186,9 @@ Please note that the badgeStyle, window shadow and border props are only applica
187186
}
188187
```
189188

190-
### 4. Hooks
189+
## 4. Hooks
191190

192-
useSiren is a hook that provides utility functions for modifying notifications.
191+
`useSiren` is a hook that provides utility functions for modifying notifications.
193192

194193
```js
195194
import { useSiren } from "@siren/react-inbox";
@@ -239,22 +238,22 @@ function MyComponent() {
239238
| deleteNotificationsByDate | startDate | ISO date string| Delete all notifications until given date |
240239
| markNotificationsAsViewed | startDate | ISO date string | Sets the viewed status of notifications to true until the given date |
241240

242-
### 5. Error codes
241+
## 5. Error codes
243242

244243
Given below are all possible error codes thrown by sdk.
245244

246-
| Error code | Message | Description |
247-
| ------------------------- | ------------------------------------- | ------------------------------------------------------------------|
248-
| INVALID_TOKEN | Invalid token | The token passed in the provider is invalid |
249-
| INVALID_RECIPIENT_ID | Invalid recipient id | The recipient id passed in the provider is invalid |
250-
| TOKEN_VERIFICATION_FAILED | This operation requires a valid token | Verification of the given tokens has failed |
251-
| GENERIC_API_ERROR | Api error | Occurrence of an unexpected api error |
252-
| OUTSIDE_SIREN_CONTEXT | Trying to invoke function outside the siren context | Attempting to invoke the functions outside the siren inbox context|
253-
| MISSING_PARAMETER | Missing Parameter | The required parameter is missing |
245+
| Error code | Description |
246+
| ------------------------- | ------------------------------------------------------------------|
247+
| INVALID_TOKEN | The token passed in the provider is invalid |
248+
| INVALID_RECIPIENT_ID | The recipient id passed in the provider is invalid |
249+
| TOKEN_VERIFICATION_FAILED | Verification of the given tokens has failed |
250+
| GENERIC_API_ERROR | Occurrence of an unexpected api error |
251+
| OUTSIDE_SIREN_CONTEXT | Attempting to invoke the functions outside the siren inbox context|
252+
| MISSING_PARAMETER | The required parameter is missing |
254253

255-
### Example
254+
## Example
256255

257-
Here's a basic example to help you get started.
256+
Here's a basic example to help you get started
258257

259258
```js
260259

0 commit comments

Comments
 (0)