Commit 717ce510 authored by Matija Obreza's avatar Matija Obreza
Browse files

App update

parent f9f28cf7
......@@ -9,3 +9,4 @@ react-loadable.json
*.snap
packages/client/lib
packages/i18n/lib
packages/counter/lib
......@@ -93,7 +93,7 @@ module.exports = {
}),
new HtmlWebpackPlugin({
title: 'Counter module', // The title to use for the generated HTML document
title: 'Seed counter', // The title to use for the generated HTML document
filename: 'index.html', // The file to write the HTML to
// minify: {...}, // Pass a html-minifier options object to minify the output
xhtml: true,
......@@ -119,7 +119,7 @@ module.exports = {
new HtmlWebpackExcludeAssetsPlugin(),
new CopyWebpackPlugin([
{ from: 'assets/img', to: 'images' },
{ from: 'assets/examples', to: 'examples' },
]),
],
......
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { count } from '@gringlobal/counter/counter';
import { ProcessImage } from './ProcessImage';
class App extends React.Component<any> {
public state = {
current: 0,
};
public render(): React.ReactNode {
return (
<div>
<img src="images/mock_img.svg" alt="mockImage" width="100px"/>
<div>current: { this.state.current }</div>
<button onClick={ () => this.setState({ current: count(this.state.current) }) }>Increment </button>
<ProcessImage />
</div>
);
}
......
import * as React from 'react';
import { count } from '@gringlobal/counter/counter';
export class ProcessImage extends React.Component<any> {
public state = {
count: 0,
};
public render(): React.ReactNode {
return (
<div>
<div>Count: { this.state.count }</div>
<img src="examples/G32 seed.jpg" />
<button onClick={ () => this.setState({ count: count(this.state.count) }) }>Increment</button>
</div>
);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment