Patterns
Docs Actions
Documentation page header controls: copy-as-Markdown and view/edit links.
The small action controls for a documentation page header. LLMCopyButton fetches the page's Markdown source and copies it to the clipboard (handy for pasting into an LLM), while ViewOptions offers links to view the raw Markdown and to edit the page on GitHub.
Import
import { LLMCopyButton, ViewOptions } from "@yuhuanowo/yunui/patterns";
Copy as Markdown
LLMCopyButton fetches markdownUrl on click and writes the text to the clipboard.
LLMCopyButton
View options
ViewOptions renders a "Markdown" link and, when githubUrl is set, an "Edit on GitHub" link.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| markdownUrl* | string | — |
| Prop | Type | Default | Description |
|---|---|---|---|
| githubUrl | string | — | |
| markdownUrl* | string | — |