Skip to content
Snippets Groups Projects
Commit e6a480e4 authored by piotr.kupczyk@id.ethz.ch's avatar piotr.kupczyk@id.ethz.ch
Browse files

SSDM-10944 : NG UI table for ELN prototype - render a compiled test React...

SSDM-10944 : NG UI table for ELN prototype - render a compiled test React component at a test HTML page
parent 1c3989ff
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ import React from 'react'
class TestGrid extends React.PureComponent {
render() {
return <div>TestGrid</div>
return <div>{this.props.text}</div>
}
}
......
......@@ -4,11 +4,15 @@ const path = require('path')
module.exports = {
entry: './src/js/components/common/grid/index.js',
output: {
path: __dirname + '/build/js',
filename: 'grid.js'
path:
__dirname +
'/../openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/react',
filename: 'Grid.js',
libraryTarget: 'var',
library: 'Grid'
},
mode: 'production',
mode: 'development',
module: {
rules: [
......@@ -40,4 +44,10 @@ module.exports = {
'@srcV3': path.resolve(__dirname, 'srcV3/')
}
}
/*
externals: {
react: 'react',
'react-dom': 'react-dom'
}
*/
}
<!--
/*
* Copyright 2014 ETH Zuerich, Scientific IT Services
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<script src="./react/react.development.js" crossorigin></script>
<script src="./react/react-dom.development.js" crossorigin></script>
<script src="./react/babel.min.js" crossorigin></script>
<script src="./react/Grid.js" crossorigin></script>
</head>
<body>
<div id="react-container">React container</div>
<script type="text/babel">
const Grid = window.Grid.default
const domContainer = document.querySelector('#react-container');
ReactDOM.render(<Grid text='Hello'/>, domContainer);
</script>
</body>
</html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment