Compare commits

...

1 Commits

Author SHA1 Message Date
a3f0df9068 idk 2022-04-03 08:15:22 -04:00
2 changed files with 61 additions and 1 deletions

View File

@ -34,7 +34,7 @@
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://unpkg.com/htm?module';
import htm from 'https://cdn.skypack.dev/htm';
const html = htm.bind(h);
let PivotForm = props =>

60
project.html Normal file
View File

@ -0,0 +1,60 @@
<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>