Skip to content

Commit

Permalink
Merge pull request #3 from shefing/Initialize_line
Browse files Browse the repository at this point in the history
Initialize line
  • Loading branch information
RachelBra authored Jan 17, 2024
2 parents 9f63f49 + fa9dfe0 commit 1e4c04c
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 28 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"preview": "vite preview"
},
"dependencies": {
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-slot": "^1.0.2",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
Expand Down
4 changes: 4 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import "./App.css";
import Ruler from "./components/Ruler";
import Toolbar from "./components/Toolbar";
import GrassImg from "./components/GrassImg";

const App = () => {
return (
<div>
{/* <Toolbar /> */}
<Ruler />
<GrassImg />
</div>
);
};
Expand Down
19 changes: 0 additions & 19 deletions src/components/Axis.tsx

This file was deleted.

11 changes: 11 additions & 0 deletions src/components/GrassImg.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import urlImg from "../../src/img/image.png";

const GrassImg = () => {
return (
<div className="absolute w-full bottom-0 left-0">
<img src={urlImg} />
</div>
);
};

export default GrassImg;
24 changes: 23 additions & 1 deletion src/components/Toolbar.tsx
Original file line number Diff line number Diff line change
@@ -1,2 +1,24 @@
const Toolbar = () => {};
import { Smile } from "lucide-react";
import LineDefinition from "./toolbar/LineDefinition";

const Toolbar = () => {
return (
<div className="flex justify-between bg-sky-100">
<div className="flex-none">
<Smile className="m-4 h-4 w-4" />
</div>
<div className="flex ">
<Smile className="m-4 h-4 w-4" />
<Smile className="m-4 h-4 w-4" />
<Smile className="m-4 h-4 w-4" />
<Smile className="m-4 h-4 w-4" />
<Smile className="m-4 h-4 w-4" />
<Smile className="m-4 h-4 w-4" />
</div>
<div className="flex-none">
<LineDefinition />
</div>
</div>
);
};
export default Toolbar;
18 changes: 10 additions & 8 deletions src/components/ruler/XAxis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ interface IProps {
}
const XAxis = ({ labels }: IProps) => {
return (
<div className="flex justify-between border-t-2 border-gray-900 pt-0 mx-0">
{labels.map((label) => (
<div key={label} className={`text-xl text-color flex flex-col items-center ${label % 5 == 0 && "font-bold"}`}>
<div className="h-3 border-l-2 border-gray-900 w-px" />
{label}
</div>
))}
</div>
<>
<div className="flex justify-between border-t-2 border-gray-900 pt-0 mx-0 pl-8 pr-8">
{labels.map((label) => (
<div key={label} className={`text-xl text-color flex flex-col items-center ${label % 5 == 0 && "font-bold"}`}>
<div className="h-3 border-l-2 border-gray-900 w-px" />
{label}
</div>
))}
</div>
</>
);
};

Expand Down
13 changes: 13 additions & 0 deletions src/components/toolbar/LineDefinition.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Button } from "../ui/button";

const LineDefinition = () => {
return (
<>
<Button className={`m-1 text-xl text-sky-600 font-bold `} variant="ghost">
<span className="mr-3">&#x25BC;</span> הגדרת הישר
</Button>
</>
);
};

export default LineDefinition;
Binary file added src/img/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ export default defineConfig({
alias: {
"@": path.resolve(__dirname, "./src"),
},

},
server: {
port: 3000,
},
})

0 comments on commit 1e4c04c

Please sign in to comment.