sum stuf
This commit is contained in:
parent
5c62a71ebd
commit
cdce22fdd6
@ -7,9 +7,8 @@ function App() {
|
|||||||
<>
|
<>
|
||||||
<Router>
|
<Router>
|
||||||
<Routes>
|
<Routes>
|
||||||
|
<Route path="/" element={<LandingPage />} />
|
||||||
<Route path="/" element={<LandingPage />} />
|
<Route path="/editor" element={<Editor name="Untitled" />} />
|
||||||
<Route path="/editor" element={<Editor name="Untitled" />} />
|
|
||||||
</Routes>
|
</Routes>
|
||||||
</Router>
|
</Router>
|
||||||
</>
|
</>
|
||||||
|
@ -154,6 +154,37 @@ export default function Canvas(props) {
|
|||||||
onMouseUp={handleMouseUp}
|
onMouseUp={handleMouseUp}
|
||||||
style={{ width: "100%", height: "100%", cursor: cursor }}
|
style={{ width: "100%", height: "100%", cursor: cursor }}
|
||||||
>
|
>
|
||||||
|
<defs>
|
||||||
|
<pattern
|
||||||
|
id="smallGrid"
|
||||||
|
width="10"
|
||||||
|
height="10"
|
||||||
|
patternUnits="userSpaceOnUse"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M 10 0 L 0 0 0 10"
|
||||||
|
fill="none"
|
||||||
|
stroke="lightblue"
|
||||||
|
strokeWidth="0.5"
|
||||||
|
/>
|
||||||
|
</pattern>
|
||||||
|
<pattern
|
||||||
|
id="grid"
|
||||||
|
width="100"
|
||||||
|
height="100"
|
||||||
|
patternUnits="userSpaceOnUse"
|
||||||
|
>
|
||||||
|
<rect width="100" height="100" fill="url(#smallGrid)" />
|
||||||
|
<path
|
||||||
|
d="M 100 0 L 0 0 0 100"
|
||||||
|
fill="none"
|
||||||
|
stroke="lightblue"
|
||||||
|
strokeWidth="1"
|
||||||
|
/>
|
||||||
|
</pattern>
|
||||||
|
</defs>
|
||||||
|
|
||||||
|
<rect width="100%" height="100%" fill="url(#grid)" />
|
||||||
{props.rectangles.map((rectangle) => (
|
{props.rectangles.map((rectangle) => (
|
||||||
<Rect
|
<Rect
|
||||||
key={rectangle.id}
|
key={rectangle.id}
|
||||||
|
@ -26,8 +26,7 @@ const Rect = (props) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
xmlns="http://www.w3.org/1999/xhtml"
|
className={`${isHovered ? "ring-2 ring-blue-400 ring-inset" : ""} bg-gray-600 p-3 select-none rounded-md`}
|
||||||
className={`${isHovered ? "bg-red-500" : "bg-blue"} p-3`}
|
|
||||||
>
|
>
|
||||||
<div className="text-white">{props.label}</div>
|
<div className="text-white">{props.label}</div>
|
||||||
<form onSubmit={(e) => e.preventDefault()}>
|
<form onSubmit={(e) => e.preventDefault()}>
|
||||||
|
Loading…
Reference in New Issue
Block a user