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

terra-props-table

Package Overview
Dependencies
Maintainers
9
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

terra-props-table - npm Package Compare versions

Comparing version 2.45.0 to 2.46.0

5

CHANGELOG.md

@@ -7,2 +7,7 @@ Changelog

2.46.0 - (April 28, 2020)
------------------
### Added
* Added clinical-lowlight-theme wdio screenshots
2.45.0 - (February 18, 2020)

@@ -9,0 +14,0 @@ ------------------

42

lib/PropsTable.js

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

if (type.value.name === 'shape') {
typeName = _react.default.createElement("span", null, ' ', "array of objects structured like:", _react.default.createElement("pre", {
typeName = /*#__PURE__*/_react.default.createElement("span", null, ' ', "array of objects structured like:", /*#__PURE__*/_react.default.createElement("pre", {
className: cx('props-table-pre')

@@ -70,7 +70,7 @@ }, ' ', formatShape(type.value.value), ' '));

var options = type.value.map(function (option) {
var name = option.name === 'shape' ? _react.default.createElement("span", {
var name = option.name === 'shape' ? /*#__PURE__*/_react.default.createElement("span", {
key: option.value
}, ' ', "an object structured like:", _react.default.createElement("pre", {
}, ' ', "an object structured like:", /*#__PURE__*/_react.default.createElement("pre", {
className: cx('props-table-pre')
}, ' ', formatShape(option.value), ' ')) : _react.default.createElement("span", {
}, ' ', formatShape(option.value), ' ')) : /*#__PURE__*/_react.default.createElement("span", {
key: option.name

@@ -81,3 +81,3 @@ }, ' ', option.name);

typeName = options.reduce(function (curr, next) {
return [curr, _react.default.createElement("span", {
return [curr, /*#__PURE__*/_react.default.createElement("span", {
key: "".concat(curr.value, "-").concat(next.value)

@@ -87,3 +87,3 @@ }, " or "), next];

} else if (typeName === 'shape') {
typeName = _react.default.createElement("span", null, ' ', "an object structured like:", _react.default.createElement("pre", {
typeName = /*#__PURE__*/_react.default.createElement("span", null, ' ', "an object structured like:", /*#__PURE__*/_react.default.createElement("pre", {
className: cx('props-table-pre')

@@ -132,18 +132,18 @@ }, ' ', formatShape(type.value), ' '));

var tableClassNames = cx(['props-table', customProps.className]);
return _react.default.createElement("div", {
return /*#__PURE__*/_react.default.createElement("div", {
dir: "ltr",
className: cx('props-table-markdown')
}, _react.default.createElement("h2", null, componentName, ' ', "Props"), _react.default.createElement("table", _extends({}, customProps, {
}, /*#__PURE__*/_react.default.createElement("h2", null, componentName, ' ', "Props"), /*#__PURE__*/_react.default.createElement("table", _extends({}, customProps, {
className: tableClassNames
}), _react.default.createElement("thead", null, _react.default.createElement("tr", null, _react.default.createElement("th", {
}), /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", {
className: cx('prop-table-name')
}, "Prop Name"), _react.default.createElement("th", {
}, "Prop Name"), /*#__PURE__*/_react.default.createElement("th", {
className: cx('prop-table-type')
}, "Type"), _react.default.createElement("th", {
}, "Type"), /*#__PURE__*/_react.default.createElement("th", {
className: cx('prop-table-required')
}, "Is Required"), _react.default.createElement("th", {
}, "Is Required"), /*#__PURE__*/_react.default.createElement("th", {
className: cx('prop-table-default')
}, "Default Value"), _react.default.createElement("th", {
}, "Default Value"), /*#__PURE__*/_react.default.createElement("th", {
className: cx('prop-table-description')
}, "Description"))), _react.default.createElement("tbody", null, Object.keys(componentProps).map(function (key) {
}, "Description"))), /*#__PURE__*/_react.default.createElement("tbody", null, Object.keys(componentProps).map(function (key) {
var prop = componentProps[key];

@@ -164,3 +164,3 @@

return _react.default.createElement("tr", {
return /*#__PURE__*/_react.default.createElement("tr", {
className: tableRowClass,

@@ -171,23 +171,23 @@ key: key,

}
}, _react.default.createElement("td", {
}, /*#__PURE__*/_react.default.createElement("td", {
style: {
fontWeight: 'bold'
}
}, key), _react.default.createElement("td", null, prop.type ? type : ''), customRequired || prop.required ? _react.default.createElement("td", {
}, key), /*#__PURE__*/_react.default.createElement("td", null, prop.type ? type : ''), customRequired || prop.required ? /*#__PURE__*/_react.default.createElement("td", {
style: {
color: '#d53700'
}
}, "required") : _react.default.createElement("td", {
}, "required") : /*#__PURE__*/_react.default.createElement("td", {
style: {
color: '#444'
}
}, "optional"), prop.defaultValue ? _react.default.createElement("td", {
}, "optional"), prop.defaultValue ? /*#__PURE__*/_react.default.createElement("td", {
style: {
fontWeight: 'bold'
}
}, prop.defaultValue.value) : _react.default.createElement("td", {
}, prop.defaultValue.value) : /*#__PURE__*/_react.default.createElement("td", {
style: {
color: '#444'
}
}, "none"), _react.default.createElement("td", null, _react.default.createElement(_terraMarkdown.default, {
}, "none"), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement(_terraMarkdown.default, {
src: prop.description

@@ -194,0 +194,0 @@ })));

@@ -18,3 +18,3 @@ "use strict";

var MockPrivatePropsTable = function MockPrivatePropsTable() {
return _react.default.createElement("div", null, _react.default.createElement(_PropsTable.default, {
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_PropsTable.default, {
id: "PrivatePropsTable",

@@ -21,0 +21,0 @@ src: _MockPrivatePropsComponent.default

@@ -18,6 +18,6 @@ "use strict";

var MockPropsTable = function MockPropsTable() {
return _react.default.createElement("div", null, _react.default.createElement(_PropsTable.default, {
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_PropsTable.default, {
id: "PropsTable",
src: _MockComponent.default
}), _react.default.createElement("p", {
}), /*#__PURE__*/_react.default.createElement("p", {
"data-terra-bottom-scroll-marker": true

@@ -24,0 +24,0 @@ }, "Marker for scrolling during tests"));

@@ -18,7 +18,7 @@ "use strict";

var MockPropsTableWithTitle = function MockPropsTableWithTitle() {
return _react.default.createElement("div", null, _react.default.createElement(_PropsTable.default, {
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_PropsTable.default, {
id: "PropsTable",
src: _MockComponent.default,
componentName: "Mock Component"
}), _react.default.createElement("p", {
}), /*#__PURE__*/_react.default.createElement("p", {
"data-terra-bottom-scroll-marker": true

@@ -25,0 +25,0 @@ }, "Marker for scrolling during tests"));

{
"name": "terra-props-table",
"main": "lib/PropsTable.js",
"version": "2.45.0",
"version": "2.46.0",
"description": "React component to render a table view for the props metadata of another react component.",

@@ -36,3 +36,3 @@ "repository": {

"react-docgen": "^2.15.0",
"terra-markdown": "^2.38.0"
"terra-markdown": "^2.39.0"
},

@@ -52,3 +52,3 @@ "scripts": {

},
"gitHead": "386cab01eec19d715778905a31bdcfd448e6e1b2"
"gitHead": "5e0b4b9f28277197ff0dfba8ff6ba0e60ebd0672"
}
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