svelte-highlight
svelte-highlight copied to clipboard
Is it possible to pass code as a slot?
Is it possible to pass code using a slot instead of a prop?
For example, I'd like to be able to do <Highlight language={typescript}> const a = "test"; </Highlight> instead of having to put the code in a prop.
The reason I'd like to see this is I'm using <Highlight /> wrapped in a <code-block> web component and it would feel more natural to pass it as a child/slot.