generated from lit/lit-element-starter-ts
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add notification docs with examples
- Loading branch information
RomanenkoStud
committed
Dec 12, 2023
1 parent
b5003c3
commit 3de185f
Showing
8 changed files
with
106 additions
and
9 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
packages/kite-chat-component/src/components/kite-toast-notification/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './kite-toast-notification'; | ||
export * from './kite-toast-notification'; | ||
export * from './kite-notification-container'; |
12 changes: 12 additions & 0 deletions
12
...kite-chat-component/src/components/kite-toast-notification/kite-notification-container.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import {LitElement, html} from 'lit'; | ||
import {customElement} from 'lit/decorators.js'; | ||
import {NotificationContainerMixin} from '../../mixins'; | ||
|
||
@customElement(KiteNotificationContainer.TAG) | ||
export class KiteNotificationContainer extends NotificationContainerMixin(LitElement) { | ||
static TAG = 'kite-notification-container'; | ||
|
||
override render() { | ||
return html`<slot></slot>`; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
packages/kite-chat-docs/src/content/docs/en/reference/examples.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
title: Elements Examples | ||
description: An example of Kite Chat elements. | ||
--- | ||
|
||
### Kite Toast Notification | ||
|
||
##### Warning | ||
<kite-toast-notification message="You are using the demo version!" type="warning"></kite-toast-notification> | ||
```html | ||
<kite-toast-notification message="You are using the demo version!" type="warning"></kite-toast-notification> | ||
``` | ||
|
||
##### Error | ||
<kite-toast-notification message="Oops! An error occurred while processing your request. It seems there was an issue with the server connection. Please try again later." type="error"></kite-toast-notification> | ||
```html | ||
<kite-toast-notification message="Oops! An error occurred while processing your request. It seems there was an issue with the server connection. Please try again later." type="error"></kite-toast-notification> | ||
``` | ||
|
||
##### Success | ||
<kite-toast-notification message="Connected to host." type="success"></kite-toast-notification> | ||
```html | ||
<kite-toast-notification message="Connected to host." type="success"></kite-toast-notification> | ||
``` | ||
|
||
##### Info | ||
<kite-toast-notification message="Your messages have been restored." type="info"></kite-toast-notification> | ||
```html | ||
<kite-toast-notification message="Your messages have been restored." type="info"></kite-toast-notification> | ||
``` | ||
|
||
### Kite Notification Container | ||
|
||
##### Collapsed | ||
<kite-notification-container> | ||
<kite-toast-notification message="You are using the demo version!" type="warning"></kite-toast-notification> | ||
<kite-toast-notification message="You are using the demo version!" type="warning"></kite-toast-notification> | ||
<kite-toast-notification message="You are using the demo version!" type="warning"></kite-toast-notification> | ||
<kite-toast-notification message="An unexpected error occurred. Please try again later." type="error"></kite-toast-notification> | ||
<kite-toast-notification message="An unexpected error occurred. Please try again later." type="error"></kite-toast-notification> | ||
</kite-notification-container> | ||
```html | ||
<kite-notification-container> | ||
<kite-toast-notification message="You are using the demo version!" type="warning"></kite-toast-notification> | ||
<kite-toast-notification message="You are using the demo version!" type="warning"></kite-toast-notification> | ||
<kite-toast-notification message="You are using the demo version!" type="warning"></kite-toast-notification> | ||
<kite-toast-notification message="An unexpected error occurred. Please try again later." type="error"></kite-toast-notification> | ||
<kite-toast-notification message="An unexpected error occurred. Please try again later." type="error"></kite-toast-notification> | ||
</kite-notification-container> | ||
``` | ||
|
||
##### Auto-dismiss | ||
<kite-notification-container> | ||
<kite-toast-notification duration="5000" message="Connected to host." type="success"></kite-toast-notification> | ||
<kite-toast-notification duration="6000" message="You are using the demo version!" type="warning"></kite-toast-notification> | ||
<kite-toast-notification duration="7000" message="An unexpected error occurred. Please try again later." type="error"></kite-toast-notification> | ||
</kite-notification-container> | ||
```html | ||
<kite-notification-container> | ||
<kite-toast-notification duration="5000" message="Connected to host." type="success"></kite-toast-notification> | ||
<kite-toast-notification duration="6000" message="You are using the demo version!" type="warning"></kite-toast-notification> | ||
<kite-toast-notification duration="7000" message="An unexpected error occurred. Please try again later." type="error"></kite-toast-notification> | ||
</kite-notification-container> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters