-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
320 additions
and
7 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
@stellar/design-system-website/docs/components/accents/tooltip.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,21 @@ | ||
--- | ||
slug: /tooltip | ||
--- | ||
|
||
# Tooltip | ||
|
||
<ComponentDescription componentName="Tooltip" /> | ||
|
||
## Example | ||
|
||
```tsx live | ||
<PreviewBlock componentName="Tooltip"> | ||
<Tooltip isVisible isContrast triggerEl={<>Tooltip trigger</>}> | ||
Lorem ipsum dolor sit | ||
</Tooltip> | ||
</PreviewBlock> | ||
``` | ||
|
||
## Props | ||
|
||
<ComponentProps componentName="Tooltip" /> |
19 changes: 19 additions & 0 deletions
19
@stellar/design-system-website/docs/components/inputs/input.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: /input | ||
--- | ||
|
||
# Input | ||
|
||
<ComponentDescription componentName="Input" /> | ||
|
||
## Example | ||
|
||
```tsx live | ||
<PreviewBlock componentName="Input"> | ||
<Input fieldSize="md" id="input" /> | ||
</PreviewBlock> | ||
``` | ||
|
||
## Props | ||
|
||
<ComponentProps componentName="Input" /> |
131 changes: 131 additions & 0 deletions
131
@stellar/design-system-website/src/componentPreview/inputPreview.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,131 @@ | ||
import React from "react"; | ||
import { ComponentPreview } from "@site/src/components/PreviewBlock"; | ||
import CheckIconSvg from "@site/static/img/check-icon.svg"; | ||
|
||
export const inputPreview: ComponentPreview = { | ||
options: [ | ||
{ | ||
type: "select", | ||
prop: "label", | ||
customValue: "Label", | ||
options: [ | ||
{ | ||
value: "", | ||
label: "No label", | ||
}, | ||
{ | ||
value: "label", | ||
label: "Label", | ||
}, | ||
], | ||
}, | ||
{ | ||
type: "select", | ||
prop: "placeholder", | ||
customValue: "Placeholder", | ||
options: [ | ||
{ | ||
value: "", | ||
label: "No placeholder", | ||
}, | ||
{ | ||
value: "placeholder", | ||
label: "Placeholder", | ||
}, | ||
], | ||
}, | ||
{ | ||
type: "select", | ||
prop: "fieldSize", | ||
options: [ | ||
{ | ||
value: "md", | ||
label: "MD", | ||
}, | ||
{ | ||
value: "sm", | ||
label: "SM", | ||
}, | ||
{ | ||
value: "xs", | ||
label: "XS", | ||
}, | ||
], | ||
}, | ||
{ | ||
type: "checkbox", | ||
prop: "disabled", | ||
label: "Disabled", | ||
}, | ||
{ | ||
type: "checkbox", | ||
prop: "isLabelUppercase", | ||
label: "Uppercase label", | ||
}, | ||
{ | ||
type: "checkbox", | ||
prop: "isPill", | ||
label: "Pill", | ||
}, | ||
{ | ||
type: "checkbox", | ||
prop: "isError", | ||
label: "Error", | ||
}, | ||
{ | ||
type: "checkbox", | ||
prop: "isExtraPadding", | ||
label: "Extra padding", | ||
}, | ||
{ | ||
type: "checkbox", | ||
prop: "isPassword", | ||
label: "Password", | ||
}, | ||
{ | ||
type: "select", | ||
prop: "rightElement", | ||
customValue: <CheckIconSvg />, | ||
options: [ | ||
{ | ||
value: "", | ||
label: "No element", | ||
}, | ||
{ | ||
value: "element", | ||
label: "Element", | ||
}, | ||
], | ||
}, | ||
{ | ||
type: "select", | ||
prop: "note", | ||
customValue: "Note message", | ||
options: [ | ||
{ | ||
value: "", | ||
label: "No note", | ||
}, | ||
{ | ||
value: "note", | ||
label: "Note", | ||
}, | ||
], | ||
}, | ||
{ | ||
type: "select", | ||
prop: "error", | ||
customValue: "Error message", | ||
options: [ | ||
{ | ||
value: "", | ||
label: "No error", | ||
}, | ||
{ | ||
value: "error", | ||
label: "Error", | ||
}, | ||
], | ||
}, | ||
], | ||
}; |
94 changes: 94 additions & 0 deletions
94
@stellar/design-system-website/src/componentPreview/tooltipPreview.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,94 @@ | ||
import { ComponentPreview } from "@site/src/components/PreviewBlock"; | ||
|
||
export const tooltipPreview: ComponentPreview = { | ||
options: [ | ||
{ | ||
type: "select", | ||
prop: "placement", | ||
options: [ | ||
{ | ||
value: "", | ||
label: "Placement", | ||
}, | ||
{ | ||
value: "bottom", | ||
label: "Bottom", | ||
}, | ||
{ | ||
value: "bottom-start", | ||
label: "Bottom start", | ||
}, | ||
{ | ||
value: "bottom-end", | ||
label: "Bottom end", | ||
}, | ||
{ | ||
value: "left", | ||
label: "Left", | ||
}, | ||
{ | ||
value: "left-start", | ||
label: "Left start", | ||
}, | ||
{ | ||
value: "left-end", | ||
label: "Left end", | ||
}, | ||
{ | ||
value: "right", | ||
label: "Right", | ||
}, | ||
{ | ||
value: "right-start", | ||
label: "Right start", | ||
}, | ||
{ | ||
value: "right-end", | ||
label: "Right end", | ||
}, | ||
{ | ||
value: "top", | ||
label: "Top", | ||
}, | ||
{ | ||
value: "top-start", | ||
label: "Top start", | ||
}, | ||
{ | ||
value: "top-end", | ||
label: "Top end", | ||
}, | ||
], | ||
}, | ||
{ | ||
type: "select", | ||
prop: "isVisible", | ||
customValue: false, | ||
options: [ | ||
{ | ||
value: "", | ||
label: "Visible", | ||
}, | ||
{ | ||
value: "hidden", | ||
label: "Hidden", | ||
}, | ||
], | ||
}, | ||
{ | ||
type: "select", | ||
prop: "isContrast", | ||
customValue: false, | ||
options: [ | ||
{ | ||
value: "", | ||
label: "Contrast", | ||
}, | ||
{ | ||
value: "noContrast", | ||
label: "No contrast", | ||
}, | ||
], | ||
}, | ||
], | ||
}; |
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
Oops, something went wrong.