-
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.
* Input docs + preview * Disabled preview
- Loading branch information
Showing
6 changed files
with
188 additions
and
4 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
@stellar/design-system-website/docs/components/inputs/_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": "Inputs", | ||
"link": { | ||
"type": "generated-index" | ||
} | ||
} |
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", | ||
}, | ||
], | ||
}, | ||
], | ||
}; |
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