Skip to content

Commit

Permalink
docs(Notifications): fix typo and add reference; (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
arudenkoofficial authored and kkmch committed Oct 24, 2023
1 parent 147f6a1 commit 90b5b2b
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/components/Notifications/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ For more code examples go to [Notifications.stories.tsx](https://github.com/grav

**Notifications** — renders notifications and actions on these notifications.

| Property | Type | Required | Default | Description |
| :-------------------------- | :-------------------- | :------: | :---------------- | :---------------------------------------------------------------------------------------- |
| `notifications` | `NotificationProps[]` | `true` | `false` | Touch device (mobile) mode |
| `title` | `ReactNode` | | `"Notifications"` | Notifications' title |
| `actions` | `ReactNode` | | | Notifications' actions (e.g. create new, mark all as read) |
| `areAllNotificationsLoaded` | `boolean` | | `false` | When `true` renders a Loader instead of the notifications |
| `onLoadMoreNotifications` | `() => Promise` | | `noop` | Callback is called when the user scrolls to the end (so you can fetch more notifications) |
| `isLoading` | `boolean` | | `false` | When `true` renders a Loader instead of the notifications |
| `errorContent` | `ReactNode` | | | Used for the Error state (the message under the «Error») |
| `errorImage` | `ReactNode` | | | Custom image for the Error state |
| `emptyContent` | `ReactNode` | | | Same as `errorContent`, but for the Empty state |
| `emptyImage` | `ReactNode` | | | Custom image for the Empty state |
| `swipeThreshold` | `number` | | 0.4 | A value from 0 to 1 — the more the harder it is to swipe |
| Property | Type | Required | Default | Description |
|:----------------------------|:----------------------|:--------:|:------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------|
| `notifications` | `NotificationProps[]` | `true` | | List of Notifications to display. [Notification' types](https://github.com/gravity-ui/components/blob/main/src/components/Notification/definitions.ts) |
| `title` | `ReactNode` | | `"Notifications"` | Notifications' title |
| `actions` | `ReactNode` | | | Notifications' actions (e.g. create new, mark all as read) |
| `areAllNotificationsLoaded` | `boolean` | | `false` | When `true` renders a Loader instead of the notifications |
| `onLoadMoreNotifications` | `() => Promise` | | `noop` | Callback is called when the user scrolls to the end (so you can fetch more notifications) |
| `isLoading` | `boolean` | | `false` | When `true` renders a Loader instead of the notifications |
| `errorContent` | `ReactNode` | | | Used for the Error state (the message under the «Error») |
| `errorImage` | `ReactNode` | | | Custom image for the Error state |
| `emptyContent` | `ReactNode` | | | Same as `errorContent`, but for the Empty state |
| `emptyImage` | `ReactNode` | | | Custom image for the Empty state |
| `swipeThreshold` | `number` | | 0.4 | A value from 0 to 1 — the more the harder it is to swipe |

**Notification** — renders a notification with actions (side/bottom/swipe).

Expand Down

0 comments on commit 90b5b2b

Please sign in to comment.