Skip to content
This repository has been archived by the owner on Feb 27, 2022. It is now read-only.

Render inlineCode and code #10

Open
emilianoyaryura opened this issue May 21, 2021 · 2 comments
Open

Render inlineCode and code #10

emilianoyaryura opened this issue May 21, 2021 · 2 comments

Comments

@emilianoyaryura
Copy link

emilianoyaryura commented May 21, 2021

is there an option to separate code and inlineCode in the components?
Here's my code:

const components = { h1: ({ children }) => { return <Heading as="h1">{children}</Heading>; } code: ({ children }) => { return <p sx={{ color: "blue", background: 'red' }}>{children}</p>; }, inlineCode: ({ children }) => { return <p sx={{ color: "red", background: 'yellow' }}>{children}</p>; } };

const content = useHydrate(doc, { components: components, });

@emilianoyaryura
Copy link
Author

emilianoyaryura commented May 21, 2021

This doesn't work.. it only render the code for both: `` and ``````

@shadcn
Copy link
Owner

shadcn commented May 21, 2021

Hmm I can't reproduce this. See https://6ezyv.sse.codesandbox.io/blog/hello-world

Can you take a look at this codesandbox: https://codesandbox.io/s/immutable-cookies-6ezyv?file=/pages/blog/%5B...slug%5D.js

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants