code-surfer
Advanced tools
Comparing version 0.2.2 to 0.3.0
@@ -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 })}> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63072
1902