New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-tradeshift-ui

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-tradeshift-ui - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

2

package.json
{
"name": "react-tradeshift-ui",
"version": "2.1.0",
"version": "2.2.0",
"main": "dist/components.js",

@@ -5,0 +5,0 @@ "module": "dist/components.js",

@@ -13,11 +13,7 @@ import React, { useEffect } from 'react';

table.rows(rows);
if (!_.isNil(pager) && pager.pages > 1) {
if (pager.pages > 1) {
table.pager(pager);
}
if (!_.isNil(onbutton)) {
table.onbutton = onbutton;
}
if (!_.isNil(linkable)) {
table.linkable = linkable;
}
table.onbutton = onbutton;
table.linkable(linkable);
});

@@ -39,3 +35,3 @@ };

linkable: () => {},
pager: {},
pager: { pages: 0, page: 0, onselect: () => {} },
className: '',

@@ -42,0 +38,0 @@ selectable: false,

@@ -7,7 +7,7 @@ import React from 'react';

const stories = storiesOf('Table', module);
const tableConfig = {
cols: [{ label: 'One' }, { label: 'Two' }, { label: 'Three' }],
rows: [['A', 'D', 'G'], ['B', 'E', 'H'], ['C', 'F', 'I']]
};
stories.add('Basic usage', () => {
const tableConfig = {
cols: [{ label: 'One' }, { label: 'Two' }, { label: 'Three' }],
rows: [['A', 'D', 'G'], ['B', 'E', 'H'], ['C', 'F', 'I']]
};
const shouldShow = boolean('shouldShow', false);

@@ -20,1 +20,48 @@ return shouldShow ? (

});
stories.add('Linkable table element', () => {
const tableConfig = {
cols: [{ label: 'name' }, { label: 'gender' }, { label: 'action' }],
rows: [
[
'Tom',
'Male',
{
text: '[sayHello](sayHello)',
type: 'say-hello'
}
],
[
'Lucy',
'Female',
{
text: '[sayHello](sayHello)',
type: 'say-hello'
}
],
[
'Li Lei',
'Male',
{
text: '[sayHello](sayHello)',
type: 'say-hello'
}
]
]
};
const handleLinkable = action => {
if (action === 'sayHello') {
window.ts.ui.Notification.info('hello');
}
};
const shouldShow = boolean('shouldShow', false);
return shouldShow ? (
<div style={{ height: 200 }}>
<Table
id="profile-table"
cols={tableConfig.cols}
rows={tableConfig.rows}
linkable={handleLinkable}
/>
</div>
) : null;
});

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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