Add code block copy and collapse functionality (#2361)

* add buttons to codeblocks

* add functionality

* Document functions

* Improve accessibility

* Remove pointless DefaultReset

* implement some requested changes

* fix content shift when expanding or collapsing

---------

Co-authored-by: Ajay Bura <32841439+ajbura@users.noreply.github.com>
This commit is contained in:
Gimle Larpes
2025-07-23 18:10:56 +03:00
committed by GitHub
parent acc7d4ff56
commit 3cdb5c2fe6
4 changed files with 155 additions and 15 deletions

View File

@@ -162,7 +162,7 @@ export function RenderElement({ attributes, element, children }: RenderElementPr
visibility="Hover"
hideTrack
>
<div className={css.CodeBlockInternal}>{children}</div>
<div className={css.CodeBlockInternal()}>{children}</div>
</Scroll>
</Text>
);