Skip to content

fix(docs): copy component examples and install commands - #10

Open
pruthivithejan wants to merge 1 commit into
michael-andreuzza:mainfrom
pruthivithejan:fix/component-preview-copy
Open

pruthivithejan wants to merge 1 commit into
michael-andreuzza:mainfrom
pruthivithejan:fix/component-preview-copy

Conversation

@pruthivithejan

Copy link
Copy Markdown

What changed

The copy button on component previews copied an empty string while the Preview tab was active. Installation command buttons also copied an empty string because they looked for the command in the wrong panel.

Read example code from the Code panel and installation commands from the selected package manager panel. Avoid showing a success indicator when there is no code to copy.

How it was tested

  • Ran pnpm build.
  • On the Button documentation page, verified the copied example from both Preview and Code tabs.
  • Verified the copied installation command for npx, bun, pnpm, and yarn.

This change was prepared with AI assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant