-
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.
* Select docs + preview * Disabled preview
- Loading branch information
Showing
5 changed files
with
144 additions
and
3 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
@stellar/design-system-website/docs/components/inputs/select.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,22 @@ | ||
--- | ||
slug: /select | ||
--- | ||
|
||
# Select | ||
|
||
<ComponentDescription componentName="Select" /> | ||
|
||
## Example | ||
|
||
```tsx live | ||
<PreviewBlock componentName="Select"> | ||
<Select fieldSize="md" id="select"> | ||
<option>Option 1</option> | ||
<option>Option 2</option> | ||
</Select> | ||
</PreviewBlock> | ||
``` | ||
|
||
## Props | ||
|
||
<ComponentProps componentName="Select" /> |
94 changes: 94 additions & 0 deletions
94
@stellar/design-system-website/src/componentPreview/selectPreview.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 selectPreview: ComponentPreview = { | ||
options: [ | ||
{ | ||
type: "select", | ||
prop: "label", | ||
customValue: "Label", | ||
options: [ | ||
{ | ||
value: "", | ||
label: "No label", | ||
}, | ||
{ | ||
value: "label", | ||
label: "Label", | ||
}, | ||
], | ||
}, | ||
{ | ||
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: "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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,6 +85,7 @@ | |
margin: 0 !important; | ||
} | ||
|
||
.PreviewBlock .Select, | ||
.PreviewBlock .Input { | ||
max-width: 24rem; | ||
} |
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