Update style and rebuild dist

This commit is contained in:
Rising Odegua 2022-02-01 11:33:45 +01:00
parent 96c482ced4
commit 48bddee6d8
6 changed files with 12 additions and 18 deletions

10
dist/index.cjs.js vendored
View File

@ -151,11 +151,7 @@ var Table = function Table(_ref) {
return row;
});
return /*#__PURE__*/React__default['default'].createElement("div", {
"data-testid": "tableGrid",
style: {
height: 400,
width: '100%'
}
"data-testid": "tableGrid"
}, /*#__PURE__*/React__default['default'].createElement(dataGrid.DataGrid, {
rows: rows,
columns: columns,
@ -225,7 +221,7 @@ var KeyInfo = function KeyInfo(_ref) {
return item.format;
}).join(', ');
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("section", {
className: "mt-8 mb-8",
className: "m-8",
name: "key-info",
id: "key-info"
}, /*#__PURE__*/React__default['default'].createElement("h2", {
@ -358,7 +354,7 @@ var ReadMe = function ReadMe(_ref) {
};
ReadMe.propTypes = {
readmeHtml: PropTypes__default['default'].string.isRequired
readme: PropTypes__default['default'].string.isRequired
};
/**

10
dist/index.esm.js vendored
View File

@ -117,11 +117,7 @@ var Table = function Table(_ref) {
return row;
});
return /*#__PURE__*/React.createElement("div", {
"data-testid": "tableGrid",
style: {
height: 400,
width: '100%'
}
"data-testid": "tableGrid"
}, /*#__PURE__*/React.createElement(DataGrid, {
rows: rows,
columns: columns,
@ -191,7 +187,7 @@ var KeyInfo = function KeyInfo(_ref) {
return item.format;
}).join(', ');
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("section", {
className: "mt-8 mb-8",
className: "m-8",
name: "key-info",
id: "key-info"
}, /*#__PURE__*/React.createElement("h2", {
@ -324,7 +320,7 @@ var ReadMe = function ReadMe(_ref) {
};
ReadMe.propTypes = {
readmeHtml: PropTypes.string.isRequired
readme: PropTypes.string.isRequired
};
/**

View File

@ -81,7 +81,9 @@ export default function Home({ dataset, specs }) {
<h1 className="text-2xl font-bold mb-4">Data Preview</h1>
<h2 className="text-1xl">{descriptor.title}</h2>
{resources[0].sample ? (
<Table columns={columns} data={tableSample} />
<div >
<Table columns={columns} data={tableSample} />
</div>
) : (
'No preview is available for this dataset'
)}

View File

@ -14,7 +14,7 @@ const KeyInfo = ({ descriptor, resources }) => {
return (
<>
<section className="mt-8 mb-8" name="key-info" id="key-info">
<section className="m-8" name="key-info" id="key-info">
<h2 className="text-xl font-bold mb-4">Key info</h2>
<div className="grid grid-cols-7 gap-4">
<div>

View File

@ -19,7 +19,7 @@ const ReadMe = ({ readme }) => {
}
ReadMe.propTypes = {
readmeHtml: PropTypes.string.isRequired
readme: PropTypes.string.isRequired
}
export default ReadMe

View File

@ -14,7 +14,7 @@ const Table = ({ columns, data }) => {
return row
})
return (
<div data-testid="tableGrid" style={{ height: 400, width: '100%' }}>
<div data-testid="tableGrid">
<DataGrid rows={rows} columns={columns} pageSize={5} />
</div>
);