diff --git a/package.json b/package.json index e254277..291e755 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "homepage": "https://dapplion.github.io/augmented-tbc-design", "dependencies": { "@material-ui/core": "^4.3.0", + "@material-ui/icons": "^4.2.1", "@types/lodash": "^4.14.136", "@types/react": "^16.8.24", "@types/react-dom": "^16.8.5", diff --git a/src/App.tsx b/src/App.tsx index 4036c9e..71301e1 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -14,6 +14,7 @@ import InputParams from "./InputParams"; import SupplyVsDemandChart from "./SupplyVsDemandChart"; import ResultParams from "./ResultParams"; import PriceSimulationChart from "./PriceSimulationChart"; +import HelpText from "./HelpText"; // Utils import { getLast, getAvg, pause } from "./utils"; import { throttle } from "lodash"; @@ -250,6 +251,18 @@ export default function App() { Curve Design + + Description of the different parameters
+ Initial raise: Lorem ipsum
+ Allocation to project: Lorem ipsum
+ Initial token price: Lorem ipsum
+ Return factor: Lorem ipsum
+ Withdrawl fee: Lorem ipsum + + } + />
@@ -262,6 +275,9 @@ export default function App() { Preview + Preview of the token bonding curve} + /> @@ -305,7 +321,10 @@ export default function App() { - Price walk + Simulation + Some context about this simulation} + /> @@ -322,6 +341,9 @@ export default function App() { Results + Explanation of what do this results mean} + /> diff --git a/src/HelpText.tsx b/src/HelpText.tsx new file mode 100644 index 0000000..9220c0b --- /dev/null +++ b/src/HelpText.tsx @@ -0,0 +1,68 @@ +import React from "react"; +import { makeStyles } from "@material-ui/core/styles"; +import Popover from "@material-ui/core/Popover"; +import Typography from "@material-ui/core/Typography"; +import Fab from "@material-ui/core/Fab"; +import HelpIcon from "@material-ui/icons/HelpOutline"; + +const useStyles = makeStyles(theme => ({ + container: { + display: "flex", + marginLeft: "6px", + fontSize: "0.9rem", + cursor: "pointer", + transition: "opacity ease 150ms", + opacity: 0.2, + "&:hover": { + opacity: 0.85 + } + }, + typography: { + padding: theme.spacing(2) + }, + paper: { + backgroundColor: "#384b59" + } +})); + +export default function SimplePopover({ text }: { text: any }) { + const classes = useStyles(); + const [anchorEl, setAnchorEl] = React.useState(null); + + function handleClick(e: any) { + setAnchorEl(e.currentTarget); + } + + function handleClose() { + setAnchorEl(null); + } + + const open = Boolean(anchorEl); + const id = open ? "simple-popover" : undefined; + + return ( +
+ + + + {text} + +
+ ); +} diff --git a/yarn.lock b/yarn.lock index e0ea911..b69ae2b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1149,6 +1149,13 @@ react-transition-group "^4.0.0" warning "^4.0.1" +"@material-ui/icons@^4.2.1": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@material-ui/icons/-/icons-4.2.1.tgz#fe2f1c4f60c24256d244a69d86d0c00e8ed4037e" + integrity sha512-FvSD5lUBJ66frI4l4AYAPy2CH14Zs2Dgm0o3oOMr33BdQtOAjCgbdOcvPBeaD1w6OQl31uNW3CKOE8xfPNxvUQ== + dependencies: + "@babel/runtime" "^7.2.0" + "@material-ui/styles@^4.2.0": version "4.3.0" resolved "https://registry.yarnpkg.com/@material-ui/styles/-/styles-4.3.0.tgz#27f11fbf061d8a20ad5703acb0dbb0e69cc00345"