Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(Notifications): fix typo and add reference; #112

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading