[PR #4516] [MERGED] feat: allow a copy props to dynamic code blocks #22322

Closed
opened 2026-04-15 20:57:53 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4516
Author: @Kinfe123
Created: 9/8/2025
Status: Merged
Merged: 9/8/2025
Merged by: @Bekacru

Base: mainHead: fix/remove-copy-buttons-blurred-code-blocks


📝 Commits (2)

📊 Changes

2 files changed (+12 additions, -1 deletions)

View changed files

📝 docs/components/api-method.tsx (+2 -0)
📝 docs/components/ui/dynamic-code-block.tsx (+10 -1)

📄 Description

this pr removes copy buttons from code blocks that are blurred/disabled for server-only and client-only endpoints in the documentation.
Screenshot 2025-09-08 at 2 02 55 PM


Summary by cubic

Removes copy buttons from blurred code examples for server-only and client-only endpoints. Adds an allowCopy prop to DynamicCodeBlock and wires it in APIMethod.

  • New Features
    • DynamicCodeBlock: new allowCopy prop (default true) to toggle the copy button.
    • APIMethod disables copying for server blocks when client-only, and for client blocks when server-only.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/4516 **Author:** [@Kinfe123](https://github.com/Kinfe123) **Created:** 9/8/2025 **Status:** ✅ Merged **Merged:** 9/8/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `fix/remove-copy-buttons-blurred-code-blocks` --- ### 📝 Commits (2) - [`ff35ccc`](https://github.com/better-auth/better-auth/commit/ff35ccc9f51c60c91147cf60527914b2708e819f) feat: allow a copy props to dynamic code blocs - [`50ab9f5`](https://github.com/better-auth/better-auth/commit/50ab9f5c2ee0bc1d304eef0db2fd102588582626) lint ### 📊 Changes **2 files changed** (+12 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/components/api-method.tsx` (+2 -0) 📝 `docs/components/ui/dynamic-code-block.tsx` (+10 -1) </details> ### 📄 Description this pr removes copy buttons from code blocks that are blurred/disabled for server-only and client-only endpoints in the documentation. <img width="776" height="213" alt="Screenshot 2025-09-08 at 2 02 55 PM" src="https://github.com/user-attachments/assets/4cfe1bde-c30f-4b83-9041-65996fb1a4d5" /> <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Removes copy buttons from blurred code examples for server-only and client-only endpoints. Adds an allowCopy prop to DynamicCodeBlock and wires it in APIMethod. - New Features - DynamicCodeBlock: new allowCopy prop (default true) to toggle the copy button. - APIMethod disables copying for server blocks when client-only, and for client blocks when server-only. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 20:57:53 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#22322