Skip to content

[bug]: Copy button is misaligned when title is missing #875

@SnehdeepDupare

Description

@SnehdeepDupare

Describe the bug

When a code block <ComponentSource /> does not have a title, the copy button is positioned incorrectly. This issue is visible in components that use manual installation, where a title is not rendered.

The problem does not occur when a title is present.

Image

Affected component/components

TweetCard, Globe, Dock, and all components where title is not rendered

How to reproduce

  1. Go to TweetCard component docs
  2. Switch the installation method to Manual
    (or open any component that does not render a title in manual installation)
  3. Observe CopyButton position in step 2 and 3.
    This issue is present everywhere the <ComponentSource /> is used without a title.
Image

Codesandbox/StackBlitz link

No response

Logs

System Info

-

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions