Skip to content
This repository has been archived by the owner on Jun 16, 2020. It is now read-only.

Commit

Permalink
Updating from master
Browse files Browse the repository at this point in the history
  • Loading branch information
robogrid committed Nov 20, 2018
2 parents 2a5f698 + d095cbd commit b626a44
Show file tree
Hide file tree
Showing 42 changed files with 10,740 additions and 953 deletions.
17 changes: 15 additions & 2 deletions .babelrc
@@ -1,10 +1,23 @@
{
"plugins": [
["@babel/plugin-transform-runtime", {
"corejs": false,
"helpers": true,
"regenerator": true,
"useESModules": false
}],
"@babel/plugin-proposal-class-properties"
],
"env": {
"production": {
"presets": ["es2015", "react", "stage-1"]
"presets": ["@babel/preset-env", "@babel/preset-react"]
},
"development": {
"presets": ["es2015", "react", "stage-1"],
"presets": ["@babel/preset-env", "@babel/preset-react"],
"plugins": ["styled-jsx/babel"]
},
"test": {
"presets": ["@babel/preset-env", "@babel/preset-react"],
"plugins": ["styled-jsx/babel"]
}
}
Expand Down
2 changes: 2 additions & 0 deletions .circleci/config.yml
Expand Up @@ -17,6 +17,8 @@ jobs:

- run: yarn install

- run: yarn test

- save_cache:
paths:
- node_modules
Expand Down
9 changes: 9 additions & 0 deletions .eslintrc.js
@@ -0,0 +1,9 @@
module.exports = {
"extends": "airbnb",
"plugins": [
"react"
],
"parser": "babel-eslint",
"rules": {
}
};
4 changes: 4 additions & 0 deletions .npmignore
@@ -0,0 +1,4 @@
src
config
.babelrc
.eslintrc
1 change: 1 addition & 0 deletions .storybook/addons.js
@@ -1,2 +1,3 @@
import '@storybook/addon-actions/register';
import '@storybook/addon-links/register';
import '@storybook/addon-notes/register';
22 changes: 18 additions & 4 deletions .storybook/config.js
@@ -1,9 +1,23 @@
import { configure } from '@storybook/react';
import { configure, addDecorator } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import { withNotes } from '@storybook/addon-notes';

addDecorator(withNotes);
addDecorator(withInfo);

configure(loadStories, module);
function loadStoriesDynamically() {
req.keys().sort().forEach(filename => req(filename));

}

// automatically import all files ending in *.stories.js
const req = require.context('../stories', true, /.stories.js$/);
function loadStories() {
req.keys().forEach(filename => req(filename));
require('../src/stories/1.index.stories.jsx')
require('../src/stories/2.createAccount.stories.jsx')
require('../src/stories/3.sendTx.stories.jsx')
require('../src/stories/4.txHistory.stories.jsx')
require('../src/stories/5.wallet.stories.jsx')
require('../src/stories/6.nodeInfo.stories.jsx')
}

configure(loadStories, module);
25 changes: 25 additions & 0 deletions .storybook/webpack.config.js
@@ -0,0 +1,25 @@
const path = require("path");

//see https://storybook.js.org/configurations/custom-webpack-config/#full-control-mode--default
// Export a function. Accept the base config as the only param.
module.exports = (storybookBaseConfig, configType) => {
// configType has a value of 'DEVELOPMENT' or 'PRODUCTION'
// You can change the configuration based on that.
// 'PRODUCTION' is used when building the static version of storybook.

// Make whatever fine-grained changes you need
storybookBaseConfig.module.rules.push({
test: /\.scss$/,
loaders: ["style-loader", "css-loader", "sass-loader"],
include: path.resolve(__dirname, "../")
});

storybookBaseConfig.module.rules.push({
test: /\.js$/,
exclude: /node_modules/,
use: ['babel-loader', 'eslint-loader']
})

// Return the altered config
return storybookBaseConfig;
};
11 changes: 10 additions & 1 deletion README.md
@@ -1,7 +1,16 @@
[![CircleCI](https://circleci.com/gh/PhilippLgh/ethereum-react-components.svg?style=shield)](https://circleci.com/gh/PhilippLgh/ethereum-react-components)

# Ethereum React Components
A components library which is used in multiple projects.
Contains frequently used Ethereum components to display and handle addresses, transactions...

For a detailed documentation check out [the generated storyboard](https://philipplgh.github.io/ethereum-react-components/docs)
For a detailed documentation check out [the generated storybook](https://philipplgh.github.io/ethereum-react-components/docs)


# Installation
```
git clone https://github.com/PhilippLgh/ethereum-react-components.git
cd ethereum-react-components
yarn
yarn storybook
```
1 change: 1 addition & 0 deletions __mocks__/fileMock.js
@@ -0,0 +1 @@
module.exports = 'test-file-stub';
3 changes: 3 additions & 0 deletions __mocks__/styleMock.js
@@ -0,0 +1,3 @@
// see https://jestjs.io/docs/en/webpack.html

module.exports = {};
3 changes: 3 additions & 0 deletions __tests__/Snapshot.js
@@ -0,0 +1,3 @@
import initStoryshots from '@storybook/addon-storyshots'

initStoryshots()

0 comments on commit b626a44

Please sign in to comment.