1.0.9 • Published 3 years ago
@segersniels/window v1.0.9
@segersniels/window
Demo
You can view it in action at my blog.
Usage
react-markdown
Use it in combination with react-markdown to nicely present code to the user.
import Window from '@segersniels/window';
import ReactMarkdown from 'react-markdown';
...
<ReactMarkdown
source={source}
renderers={{
code: Window,
}}
/>
...
Custom usage
Use it independently and pass whatever children
you want to it. Please note that when passing children
you will not have syntax highlighting enabled.
<Window>
<p>Hello World!</p>
</Window>
However you can pass your own code to the value
prop directly and control the language by passing the language
prop. This will override any children passed.
<Window value='const foo = "bar";' language="javascript" />
1.1.0-beta.1
3 years ago
1.1.0-beta.0
3 years ago
1.0.9
3 years ago
1.0.8
4 years ago
1.0.7
4 years ago
1.0.7-beta.1
4 years ago
1.0.7-beta.0
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.2
4 years ago
1.0.3
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago