60 lines
1.1 KiB
HTML
60 lines
1.1 KiB
HTML
<div id="app"></div>
|
|
|
|
<script type="module">
|
|
import { h, render, createContext, Fragment } from 'https://cdn.skypack.dev/preact';
|
|
import { useReducer, useState } from 'https://cdn.skypack.dev/preact/hooks';
|
|
import { css, cx } from 'https://cdn.skypack.dev/@emotion/css';
|
|
import htm from 'https://cdn.skypack.dev/htm';
|
|
const html = htm.bind(h);
|
|
|
|
let project =
|
|
{
|
|
csv:false,
|
|
headers:true,
|
|
types:[],
|
|
labels:[],
|
|
pivots:
|
|
[
|
|
{
|
|
label:"",
|
|
indicies:[],
|
|
modifications:
|
|
[
|
|
{
|
|
path:[],
|
|
delta:[]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
};
|
|
|
|
|
|
let Project = props =>
|
|
{
|
|
let handleChange = e =>
|
|
{
|
|
var fr=new FileReader();
|
|
fr.onload=function(){ fr.result; }
|
|
fr.readAsText(e.target.files[0]);
|
|
console.log(e.target.files[0])
|
|
};
|
|
return html
|
|
`
|
|
<input type="file" onChange=${handleChange}/>
|
|
`;
|
|
}
|
|
|
|
var Render = () =>
|
|
{
|
|
render(html
|
|
`
|
|
<div>
|
|
<h1>hey</h1>
|
|
<${Project}><//>
|
|
</div>
|
|
`
|
|
, document.querySelector("#app"));
|
|
}
|
|
Render();
|
|
</script> |