tailwind progress

master
howard 2021-04-01 03:10:00 -07:00
parent ccf6c987d3
commit 81e0e24c3c
3 changed files with 26 additions and 26 deletions

11
dist/index.html vendored
View File

@ -15,20 +15,11 @@
<link rel="apple-touch-icon" href="icon-192.png" /> <link rel="apple-touch-icon" href="icon-192.png" />
<link rel="manifest" href="manifest.json" /> <link rel="manifest" href="manifest.json" />
<link href="app.css" rel="stylesheet">
<title>CAD Tool</title> <title>CAD Tool</title>
<style> <style>
html,
body {
margin: 0;
height: 100%;
}
#c {
width: 100%;
height: 100%;
display: block;
}
</style> </style>

View File

@ -1,19 +1,22 @@
@tailwind base; @tailwind base;
@tailwind components; @tailwind components;
@tailwind utilities; @tailwind utilities;
.buttons-group { html,
position: absolute; body {
left:0; margin: 0;
display: flex; height: 100%;
flex-direction: column; }
#c {
width: 100%;
height: 100%;
display: block;
} }
/* .feature-tree { @layer components {
color: red; .btn-blue {
position: absolute; @apply bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded cursor-pointer
right:0; }
} */ }

View File

@ -38,17 +38,23 @@ const App = () => {
return <> return <>
<div className='buttons-group'> <div className='absolute left-0 flex flex-col'>
{/* <div className='buttons-group'> */}
{activeSketchNid ? {activeSketchNid ?
<button onClick={() => treeEntries.byNid[activeSketchNid].deactivate()}> <div
className='btn-blue'
onClick={() => treeEntries.byNid[activeSketchNid].deactivate()}>
Exit sketch Exit sketch
</button> : </div> :
<button onClick={sc.addSketch}> addsketch </button> <div
className='btn-blue'
onClick={sc.addSketch}> addsketch </div>
} }
<button onClick={() => sc.extrude(treeEntries.byNid[activeSketchNid])}> extrude </button> <button onClick={() => sc.extrude(treeEntries.byNid[activeSketchNid])}> extrude </button>
{/* <button onClick={() => setState('')}> test </button> */} {/* <button onClick={() => setState('')}> test </button> */}
</div> </div>
<div className='absolute right-0'> <div className='absolute right-0'>
{treeEntries.allNids.map((entId, idx) => ( {treeEntries.allNids.map((entId, idx) => (
<div className='text-red-700 text-4xl' key={idx} <div className='text-red-700 text-4xl' key={idx}