diff --git a/ui/components/Shared/SharedToggleButton.tsx b/ui/components/Shared/SharedToggleButton.tsx new file mode 100644 index 0000000000..b8e7b29758 --- /dev/null +++ b/ui/components/Shared/SharedToggleButton.tsx @@ -0,0 +1,43 @@ +import React, { useState, ReactElement } from "react" +import classNames from "classnames" + +export default function SharedToggleButton(): ReactElement { + const [isActive, setIsActive] = useState(false) + + return ( + + ) +} diff --git a/ui/pages/Menu.tsx b/ui/pages/Menu.tsx index 0499ac6f0c..6302e80add 100644 --- a/ui/pages/Menu.tsx +++ b/ui/pages/Menu.tsx @@ -1,22 +1,144 @@ -import React, { ReactElement } from "react" +import React, { useState, ReactElement } from "react" +import classNames from "classnames" import CorePage from "../components/Core/CorePage" +import SharedButton from "../components/Shared/SharedButton" +import SharedToggleButton from "../components/Shared/SharedToggleButton" + +function SettingRow(props: { title: string; action: any }): ReactElement { + const { title, action } = props + + return ( +
  • +
    {title}
    +
    {action()}
    + +
  • + ) +} + +function ArrowRightIcon() { + return ( +
    + +
    + ) +} + +const settings = { + general: [ + { + title: "Main Currency", + action: () => { + return ( + + USD + + ) + }, + }, + { + title: "Hide asset balance under $2", + action: SharedToggleButton, + }, + { + title: "Use Tally as default wallet", + action: SharedToggleButton, + }, + { + title: "Token list", + action: ArrowRightIcon, + }, + ], + developer: [ + { + title: "Show testnet networks", + action: SharedToggleButton, + }, + { + title: "Contracts deployed by users", + action: ArrowRightIcon, + }, + ], +} export default function Menu(): ReactElement { return ( <> - - Menu + +
    +

    Settings

    +
    +

    General

    +
      + {settings.general.map((setting) => ( + + ))} +
    +
    +

    Developer

    +
      + {settings.developer.map((setting) => ( + + ))} +
    +
    diff --git a/ui/public/images/lock@2x.png b/ui/public/images/lock@2x.png new file mode 100644 index 0000000000..531bbc89fa Binary files /dev/null and b/ui/public/images/lock@2x.png differ