-
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.
* Tooltip docs + preview * Trigger PR preview
- Loading branch information
Showing
4 changed files
with
141 additions
and
3 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" /> |
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