Skip to content

Commit

Permalink
feature43-menuForFivePrimitives (#60)
Browse files Browse the repository at this point in the history
* add graphic content

* create menu for primitives
  • Loading branch information
kellar1896 authored Jul 6, 2022
1 parent 735bb6d commit 47d62ec
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 755 deletions.
Binary file added assets/icons/angle.webp
Binary file not shown.
Binary file added assets/icons/circle.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/line.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/point.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions components/organisms/codeTools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useState } from "react";
import { useContext } from "react";
import EditorButton from "../atoms/editorButton";
import { DotsHorizontalIcon } from "@heroicons/react/outline";
import PrimitivesMenu from "./primitivesMenu";

const CodeTools = () => {
const { t } = useTranslation("smith");
Expand All @@ -19,6 +20,7 @@ const CodeTools = () => {
className="w-full input input-primary input-bordered"
/>
<button className="btn btn-primary">{t("go")}</button>
<PrimitivesMenu />
</div>
<div className="form-control flex-row">
<label className="cursor-pointer label mr-6">
Expand Down
24 changes: 24 additions & 0 deletions components/organisms/primitivesMenu.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from "react";
import {
BeakerIcon
} from "@heroicons/react/outline";
import point from '../../assets/icons/point.png';
import line from '../../assets/icons/line.png';
import circle from '../../assets/icons/circle.jpeg';
import angle from '../../assets/icons/angle.webp';

const PrimitivesMenu = () => {
return(
<div className="dropdown">
<button className="btn btn-primary"><BeakerIcon className="w-6" /></button>
<ul className="dropdown-content menu p-2 shadow bg-base-100 rounded-box w-52">
<li><a><img src={point.src} className='w-4 mr-2' alt="point" /> Punto</a></li>
<li><a><img src={line.src} className='w-4 mr-2' alt="line" /> Linea</a></li>
<li><a><img src={circle.src} className='w-4 mr-2' alt="circle" /> Circulo</a></li>
<li><a><img src={angle.src} className='w-4 mr-2' alt="angle" /> Angulo</a></li>
</ul>
</div>
)
}

export default PrimitivesMenu;
1 change: 1 addition & 0 deletions pages/smith.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
import Link from "next/link";
import CodeTools from "../components/organisms/codeTools";
import DrawerSmithOptions from "../components/organisms/drawerSmithOptions";
import PrimitivesMenu from "../components/organisms/primitivesMenu";

const Smith: React.FC = () => {
const { t } = useTranslation("smith");
Expand Down
770 changes: 15 additions & 755 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 47d62ec

Please sign in to comment.