Socket
Socket
Sign inDemoInstall

code-surfer

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

code-surfer - npm Package Compare versions

Comparing version 0.2.2 to 0.3.0

10

dist/code-surfer.js

@@ -54,3 +54,4 @@ "use strict";

dark = _ref.dark,
theme = _ref.theme;
theme = _ref.theme,
monospace = _ref.monospace;

@@ -79,7 +80,10 @@ var tokensPerLine = (0, _stepParser2.default)(step);

className: className,
style: Object.assign({}, style, { background: null })
style: Object.assign({}, style, {
background: null,
fontFamily: monospace
})
},
_react2.default.createElement(
Scroller.Content,
{ type: "code" },
{ type: "code", style: { fontFamily: monospace } },
tokens.map(function (line, i) {

@@ -86,0 +90,0 @@ return _react2.default.createElement(

@@ -15,3 +15,3 @@ {

],
"version": "0.2.2",
"version": "0.3.0",
"main": "dist/code-surfer.js",

@@ -18,0 +18,0 @@ "author": "pomber",

@@ -18,3 +18,11 @@ import React from "react";

const CodeSurfer = ({ code, step, lang, showNumbers, dark, theme }) => {
const CodeSurfer = ({
code,
step,
lang,
showNumbers,
dark,
theme,
monospace
}) => {
const tokensPerLine = getTokensPerLine(step);

@@ -36,5 +44,8 @@ const isSelected = (lineIndex, tokenIndex) =>

className={className}
style={Object.assign({}, style, { background: null })}
style={Object.assign({}, style, {
background: null,
fontFamily: monospace
})}
>
<Scroller.Content type="code">
<Scroller.Content type="code" style={{ fontFamily: monospace }}>
{tokens.map((line, i) => (

@@ -41,0 +52,0 @@ <div {...getLineProps({ line, key: i })}>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc