Skip to content

Commit

Permalink
upgrade to renoun 8.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
noxify committed Jan 30, 2025
1 parent 526720c commit e74b6ce
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 30 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
"react-dom": "19.0.0",
"react-element-to-jsx-string": "17.0.0",
"rehype-mdx-import-media": "^1.2.0",
"renoun": "8.2.0",
"renoun": "8.3.0",
"restyle": "3.1.2",
"tailwind-merge": "2.6.0",
"tailwind-merge": "3.0.1",
"tailwindcss-animate": "1.0.7",
"tm-themes": "1.9.8",
"ts-dot-prop": "2.1.4",
Expand Down
43 changes: 21 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions src/mdx-components.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ComponentPropsWithoutRef, ReactNode } from "react"
import type { CodeBlockProps, CodeInlineProps } from "renoun/components"
import type { CodeBlockProps } from "renoun/components"
import type { MDXComponents } from "renoun/mdx"
import Image from "next/image"
import Link from "next/link"
Expand All @@ -10,7 +10,7 @@ import {
AccordionTrigger as BaseAccordionTrigger,
} from "@/components/ui/accordion"
import { ExternalLinkIcon } from "lucide-react"
import { CodeBlock, CodeInline } from "renoun/components"
import { CodeBlock, CodeInline, parseCodeProps } from "renoun/components"

import { DataTableBuilder } from "./components/data-table-builder"
import MermaidWrapper from "./components/mermaid-wrapper"
Expand Down Expand Up @@ -108,13 +108,12 @@ export function useMDXComponents() {
</div>
</section>
),

// Inline code
// adding the children prop as workaround (?)
code: (props: CodeInlineProps & { children: string }) => {
code: (props) => {
return (
<CodeInline
value={props.children}
//language={props.language}
{...parseCodeProps(props)}
allowErrors
css={{
backgroundColor: "hsl(var(--secondary))",
Expand Down

0 comments on commit e74b6ce

Please sign in to comment.