Add code block language header and improve styles (#2403)
Some checks failed
Deploy to Netlify (dev) / Deploy to Netlify (push) Has been cancelled

* add code block language header and improve styles

* improve codeblock fallback text

* move floating expand button to code block header

* reduce code font size
This commit is contained in:
Ajay Bura 2025-07-27 17:51:09 +05:30 committed by GitHub
parent d8d4714370
commit 31942b1114
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 123 additions and 99 deletions

View file

@ -157,12 +157,12 @@ export function RenderElement({ attributes, element, children }: RenderElementPr
<Text as="pre" className={css.CodeBlock} {...attributes}>
<Scroll
direction="Horizontal"
variant="Secondary"
variant="SurfaceVariant"
size="300"
visibility="Hover"
hideTrack
>
<div className={css.CodeBlockInternal()}>{children}</div>
<div className={css.CodeBlockInternal}>{children}</div>
</Scroll>
</Text>
);