prism-react-renderer
prism-react-renderer copied to clipboard
Request to expose useGetLineProps, useGetTokenProps, useThemeDictionary
Is there an existing issue for this?
- [X] I have searched the existing issues
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Feature Request
Hi! It would be great if you could expose:
- `useGetLineProps()`
- `useGetTokenProps()`
- `useThemeDictionary()`
Previously you exposed `useTokenize` which is great!(https://github.com/FormidableLabs/prism-react-renderer/issues/236)
But to render those tokens in my own component it would help a lot if
I could still use `getLineProps` and `getTokenProps`, which it
seems like I should be able to do if the above three hooks were exposed.
I agree, this would be a great addition, currently in order to access things like lineCount ahead of time you have to organize your whole code around the <Highlight> component or call useTokenize separately just for that, it's a little awkward
@dentrado @Georgegriff Could you describe your use case for us? I'm trying to understand how your using it without the Highlight component. We can certainly expose these internal hooks, but I want to be sure it will actually solve your use cases.
Just want to check in @dentrado and @Georgegriff and see if you had any additional information that could help us.
Closing due to lack of feedback from requestors