New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@segersniels/window

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@segersniels/window

Syntax highlighting in a nicely framed OSX like terminal window for usage with react-markdown

latest
Source
npmnpm
Version
1.0.9
Version published
Maintainers
1
Created
Source

@segersniels/window

Actionsnpm

screenshot

Demo

You can view it in action on 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" />

custom

Keywords

react

FAQs

Package last updated on 13 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts