Skip to content

feat(McpInstallButton): add icon-only mode, configurable header, and Docusaurus styling#7

Merged
scalvert merged 4 commits into
mainfrom
feat/mcp-install-button-enhancements
Jan 28, 2026
Merged

feat(McpInstallButton): add icon-only mode, configurable header, and Docusaurus styling#7
scalvert merged 4 commits into
mainfrom
feat/mcp-install-button-enhancements

Conversation

@scalvert

@scalvert scalvert commented Jan 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add icon-only mode: omit label prop to show just the MCP icon
  • Add configurable headerText prop (default: "Choose your AI tool:")
  • Refactor CSS to use Docusaurus/Infima variables for easy theme customization
  • Restore default export in src/index.ts required for Docusaurus plugin loading
  • Update example to demonstrate new features

New Props

Prop Type Default Description
label string (none) Button label. If omitted, shows only the MCP icon
headerText string "Choose your AI tool:" Text shown at top of dropdown

CSS Changes

Now uses Docusaurus CSS variables for theming:

  • --ifm-pre-background / --ifm-pre-color for code blocks
  • --ifm-color-emphasis-* for copy button
  • All other Infima variables for consistent theming

Test plan

  • Run npm run build and verify no errors
  • Run the example site and verify McpInstallButton renders correctly
  • Verify icon-only mode works (no label prop)
  • Verify custom header text displays in dropdown
  • Verify light/dark mode styling looks correct

🤖 Generated with Claude Code

scalvert and others added 3 commits January 27, 2026 17:41
…e-aware code blocks

- Make `label` prop optional - when omitted, shows only the MCP icon
- Add `headerText` prop to customize dropdown header (default: "Choose your AI tool:")
- Use grey code blocks in light mode, dark in dark mode (via CSS variables)
- Add aria-label for accessibility when in icon-only mode

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace custom hardcoded colors with Docusaurus CSS variables:
- --ifm-pre-background / --ifm-pre-color for code blocks
- --ifm-color-emphasis-* for grays (adapts to light/dark)
- --ifm-color-success for success states

This allows users to override styles via their Docusaurus theme
and ensures consistent theming across light/dark modes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Docusaurus requires plugins to have a default export. Also updates
the example to demonstrate icon-only mode with custom header text.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@scalvert scalvert added bug Something isn't working enhancement New feature or request labels Jan 28, 2026
@scalvert

Copy link
Copy Markdown
Owner Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

@scalvert scalvert merged commit 1cc639d into main Jan 28, 2026
8 checks passed
@scalvert scalvert deleted the feat/mcp-install-button-enhancements branch January 28, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant