-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Notification docs + preview * Cleanup
- Loading branch information
Showing
6 changed files
with
123 additions
and
4 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
@stellar/design-system-website/docs/components/notifications/_category_.json
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,6 @@ | ||
{ | ||
"label": "Notifications", | ||
"link": { | ||
"type": "generated-index" | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
@stellar/design-system-website/docs/components/notifications/notification.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,19 @@ | ||
--- | ||
slug: /notification | ||
--- | ||
|
||
# Notification | ||
|
||
<ComponentDescription componentName="Notification" /> | ||
|
||
## Example | ||
|
||
```tsx live | ||
<PreviewBlock componentName="Notification"> | ||
<Notification title="Notification title" variant="primary" /> | ||
</PreviewBlock> | ||
``` | ||
|
||
## Props | ||
|
||
<ComponentProps componentName="Notification" /> |
65 changes: 65 additions & 0 deletions
65
@stellar/design-system-website/src/componentPreview/notificationPreview .tsx
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,65 @@ | ||
import React from "react"; | ||
import { ComponentPreview } from "@site/src/components/PreviewBlock"; | ||
import CheckIconSvg from "@site/static/img/check-icon.svg"; | ||
|
||
export const notificationPreview: ComponentPreview = { | ||
options: [ | ||
{ | ||
type: "select", | ||
prop: "variant", | ||
options: [ | ||
{ | ||
value: "primary", | ||
label: "Primary", | ||
}, | ||
{ | ||
value: "secondary", | ||
label: "Secondary", | ||
}, | ||
{ | ||
value: "success", | ||
label: "Success", | ||
}, | ||
{ | ||
value: "error", | ||
label: "Error", | ||
}, | ||
{ | ||
value: "warning", | ||
label: "Warning", | ||
}, | ||
], | ||
}, | ||
{ | ||
type: "select", | ||
prop: "icon", | ||
customValue: <CheckIconSvg />, | ||
options: [ | ||
{ | ||
value: "", | ||
label: "Default icon", | ||
}, | ||
{ | ||
value: "customIcon", | ||
label: "Custom icon", | ||
}, | ||
], | ||
}, | ||
{ | ||
type: "select", | ||
prop: "children", | ||
customValue: | ||
"Lorem ipsum dolor sit amet consectetur, adipisicing elit. Tenetur asperiores autem excepturi doloremque esse, dicta sunt soluta! Quia quis eos beatae et optio facere voluptatum. Labore illum molestiae corporis id?", | ||
options: [ | ||
{ | ||
value: "", | ||
label: "No message", | ||
}, | ||
{ | ||
value: "Message", | ||
label: "Message", | ||
}, | ||
], | ||
}, | ||
], | ||
}; |
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