diff --git a/src/js/common/components/Example/Example.jsx b/src/js/common/components/Example/Example.jsx
new file mode 100644
index 0000000..9b8f7c0
--- /dev/null
+++ b/src/js/common/components/Example/Example.jsx
@@ -0,0 +1,24 @@
+import React, { PureComponent } from 'react'
+
+class Example extends PureComponent {
+ render () {
+ const props = this.props;
+ const result = props.example && props.example.result ? props.example.result : null;
+
+ if (result && result.size && result.size > 0) {
+ return (
+
+
+
+ {JSON.stringify(result.toJS(), undefined, 2)}
+
+
+
+
+ );
+ }
+ return
;
+ }
+}
+
+export default Example
diff --git a/src/js/common/components/Example/index.js b/src/js/common/components/Example/index.js
new file mode 100644
index 0000000..479da98
--- /dev/null
+++ b/src/js/common/components/Example/index.js
@@ -0,0 +1 @@
+export { default as Example } from './Example'
diff --git a/src/js/views/example/index.jsx b/src/js/views/example/index.jsx
index da6eb67..99c2b00 100644
--- a/src/js/views/example/index.jsx
+++ b/src/js/views/example/index.jsx
@@ -1,8 +1,10 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types'
import { connect } from 'react-redux';
+
import { actions as exampleActions } from '../../redux/modules/example';
import { exampleSelector } from '../../redux/selectors/exampleSelector';
+import { Example } from '../../common/components/Example'
require('../../../style/index.css');
@@ -25,21 +27,7 @@ class ExampleView extends Component {
}
render() {
- const result = this.props.example.result ? this.props.example.result : null;
-
- if (result && result.size && result.size > 0) {
- return (
-
-
-
- {JSON.stringify(result.toJS(), undefined, 2)}
-
-
-
-
- );
- }
- return
;
+ return
}
}
diff --git a/src/style/index.css b/src/style/index.css
index deeec90..a31b17e 100644
--- a/src/style/index.css
+++ b/src/style/index.css
@@ -1,5 +1,3 @@
-/* TODO: import is not working
- ---------------------- */
@import "configs/color";
/* Example handler
@@ -10,3 +8,7 @@
color: brown;
font-size: 0.8em;
}
+
+h2 {
+ font-family: Aspira;
+}
diff --git a/stories/example.js b/stories/example.js
new file mode 100644
index 0000000..8ce78a3
--- /dev/null
+++ b/stories/example.js
@@ -0,0 +1,9 @@
+import React from 'react';
+import { storiesOf } from '@storybook/react'
+
+import { Example } from '../src/js/common/components/Example'
+import { exampleData } from '../__fixtures__'
+
+storiesOf('Example View', module)
+ .add('no data', () =>
)
+ .add('with example data', () =>
);
diff --git a/webpack.config.common.js b/webpack.config.common.js
index 1fd5666..395f01b 100644
--- a/webpack.config.common.js
+++ b/webpack.config.common.js
@@ -96,7 +96,7 @@ const COMMON_LOADERS = [
],
},
{
- test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
+ test: /\.[ot]tf(\?v=\d+\.\d+\.\d+)?$/,
use: [
{
loader: 'url-loader',
@@ -111,7 +111,11 @@ const COMMON_LOADERS = [
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
use: [
{
- loader: 'file-loader',
+ loader: 'url-loader',
+ options: {
+ limit: 10000,
+ mimetype: 'application/vnd.ms-fontobject',
+ }
}
],
}
@@ -153,4 +157,4 @@ export default {
tls:'{}',
net:'{}'
},
-};
\ No newline at end of file
+};