diff --git a/package.json b/package.json index 979456bc8..5200f09f3 100644 --- a/package.json +++ b/package.json @@ -11,13 +11,13 @@ "electron-compile": "^6.4.2", "electron-menubar": "^1.0.1", "electron-squirrel-startup": "^1.0.0", + "file-extension": "^4.0.1", "go-ipfs-dep": "^0.4.13", + "ipfs-stats": "^1.1.4", "ipfsd-ctl": "^0.27.0", - "file-extension": "^4.0.1", - "ipfs-stats": "^1.0.4", + "is-ipfs": "^0.3.2", "moment": "^2.20.1", "multiaddr": "^3.0.2", - "is-ipfs": "^0.3.2", "normalize.css": "^7.0.0", "pretty-bytes": "^4.0.2", "prop-types": "^15.6.0", diff --git a/src/components/Block.js b/src/components/Block.js new file mode 100644 index 000000000..3f7495957 --- /dev/null +++ b/src/components/Block.js @@ -0,0 +1,45 @@ +import React from 'react' +import PropTypes from 'prop-types' + +/** + * It's a Block. + * + * @param {Object} props + * + * @prop {Any} wrapped + * @prop {Any} unwrapped + * @prop {Function} [onClick] + * + * @return {ReactElement} + */ +export default function Block (props) { + let className = 'block' + if (props.className !== '') { + className += ' ' + props.className + } + + if (props.onClick !== null) { + className += ' clickable' + } + + return ( +
{props.title}
-{props.info}
-{props.title}
+{props.info}
+{props.name}
+{prettyBytes(props.size)} | {props.hash}
+{props.title}
{info}{props.name}
-{moment(props.date).fromNow()}
-- You do not have any files yet. Add your first one by dropping - it here or clicking on one of the buttons on the bottom right side. -
- ) - } - - return connectDropTarget( -{prettyBytes(props.repo.RepoSize)}
-Sharing {props.repo.NumObjects} objects
-+ You do not have any files yet. Add your first one by dropping + it here or clicking on one of the buttons on the bottom right side. +
+ ) + } + + return connectDropTarget( +{prettyBytes(props.repo.RepoSize)}
+Sharing {props.repo.NumObjects} objects
+