Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

codelabs-react

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codelabs-react - npm Package Compare versions

Comparing version 1.6.0 to 1.7.0

src/__snapshots__/core.test.js.snap

6

dist/core.test.js

@@ -9,8 +9,4 @@ "use strict";

var _assert = _interopRequireDefault(require("assert"));
var _document = require("../stories/document-1607876232180.json");
var _expected = _interopRequireDefault(require("./__test/expected.json"));
var _extract = _interopRequireDefault(require("./extract"));

@@ -30,3 +26,3 @@

_assert["default"].deepStrictEqual(JSON.parse(JSON.stringify(tree)), _expected["default"]);
expect(tree).toMatchSnapshot();
});

@@ -33,0 +29,0 @@ test("Page can be navigated using the side navigation", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {

@@ -61,5 +61,5 @@ "use strict";

return _objectSpread(_objectSpread({
return _objectSpread(_objectSpread(_objectSpread({
content: element.textRun.content
}, getElementProperties(element)), getBold(element));
}, getElementProperties(element)), getBold(element)), getItalic(element));
})

@@ -244,2 +244,8 @@ };

function getItalic(element) {
return {
italic: !!element.textRun.textStyle.italic
};
}
function getParagraphText(node) {

@@ -246,0 +252,0 @@ return node.paragraph.elements[0].textRun.content;

@@ -183,2 +183,6 @@ "use strict";

return /*#__PURE__*/_react["default"].createElement("span", {
style: {
fontWeight: element.bold ? "bold" : "normal",
fontStyle: element.italic ? "italic" : "normal"
},
key: key

@@ -185,0 +189,0 @@ }, element.content);

{
"name": "codelabs-react",
"version": "1.6.0",
"version": "1.7.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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

import assert from "assert";
import { content } from "../stories/document-1607876232180.json";
import expected from "./__test/expected.json";
import Extract from "./extract";

@@ -24,3 +21,3 @@

const tree = Extract.parse(content);
assert.deepStrictEqual(JSON.parse(JSON.stringify(tree)), expected);
expect(tree).toMatchSnapshot();
});

@@ -27,0 +24,0 @@

@@ -47,2 +47,3 @@ const infoColor = { red: 0.8509804, green: 0.91764706, blue: 0.827451 };

...getBold(element),
...getItalic(element),
};

@@ -265,2 +266,8 @@ }),

function getItalic(element) {
return {
italic: !!element.textRun.textStyle.italic,
};
}
function getParagraphText(node) {

@@ -267,0 +274,0 @@ return node.paragraph.elements[0].textRun.content;

@@ -160,3 +160,13 @@ import React, { useState } from "react";

return <span key={key}>{element.content}</span>;
return (
<span
style={{
fontWeight: element.bold ? "bold" : "normal",
fontStyle: element.italic ? "italic" : "normal",
}}
key={key}
>
{element.content}
</span>
);
})}

@@ -163,0 +173,0 @@ </Tag>

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