Skip to content

Commit

Permalink
🐛Fix automatic rounding of prism blocks (tinacms#2789)
Browse files Browse the repository at this point in the history
Fix automatic rounding of prism blocks
  • Loading branch information
joshbermanssw authored Jan 24, 2025
1 parent 9191074 commit 55e4ce5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion components/blocks/Features/Features.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export function FeatureBlock({ data, index }) {
}}
>
<CodeWrapper>
<div className="[&>pre]:!bg-transparent [&>pre]:!border-none">
<div className="[&>pre]:!bg-transparent [&>pre]:!border-none rounded-xl">
<Prism
lang={
data.media[0].language
Expand Down
2 changes: 1 addition & 1 deletion components/blocks/Story/Story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ const Pane = ({ data, position, ...props }) => {
}}
>
<CodeWrapper>
<div className="[&>pre]:!bg-transparent [&>pre]:!border-none">
<div className="[&>pre]:!bg-transparent [&>pre]:!border-none rounded-xl">
<Prism
lang={
data.file.language ? data.file.language : 'javascript'
Expand Down
2 changes: 1 addition & 1 deletion components/tinaMarkdownComponents/docAndBlogComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ export const docAndBlogComponents: Components<{
// @ts-ignore TODO: fix this in TinaCMS
code_block: ({ value, lang, children }) => {
return (
<div className="py-3 word-break white-space overflow-x-hidden">
<div className="py-3 word-break white-space overflow-x-hidden rounded-xl">
<Prism
value={children || value || ''}
lang={lang || 'jsx'}
Expand Down
4 changes: 2 additions & 2 deletions components/ui/GraphQLQueryResponseTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const GraphQLQueryResponseTabs = ({ ...props }) => {
<div
className="h-fit grid grid-cols-1 w-full">
<div
className={containerStyling}
className={`${containerStyling} rounded-b-xl`}
style={{
zIndex: isQuery ? 5 : 1,
}}>
Expand All @@ -62,7 +62,7 @@ export const GraphQLQueryResponseTabs = ({ ...props }) => {
{overlay}
</div>
<div
className={containerStyling}
className={`${containerStyling} rounded-b-xl`}
style={{
zIndex: isQuery ? 1 : 5,
}}>
Expand Down
6 changes: 5 additions & 1 deletion styles/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,8 @@
body {
@apply bg-background text-foreground;
}
}
}

pre.prism-code.language-json {
border-radius: 0 !important;
}

0 comments on commit 55e4ce5

Please sign in to comment.