import React, { useState } from "react"; import { PaddedColumn, Separator } from "./styleds"; import { RowBetween } from "../Row"; import { ArrowLeft } from "react-feather"; import { Text } from "rebass"; import { CloseIcon } from "../../theme"; import styled from "styled-components/macro"; import { Token } from "@uniswap/sdk-core"; import { ManageLists } from "./ManageLists"; import ManageTokens from "./ManageTokens"; import { TokenList } from "@uniswap/token-lists"; import { CurrencyModalView } from "./CurrencySearchModal"; const Wrapper = styled.div` width: 100%; position: relative; padding-bottom: 80px; `; const ToggleWrapper = styled(RowBetween)` background-color: ${({ theme }) => theme.bg3}; border-radius: 12px; padding: 6px; `; const ToggleOption = styled.div<{ active?: boolean }>` width: 48%; padding: 10px; display: flex; align-items: center; justify-content: center; border-radius: 12px; font-weight: 600; background-color: ${({ theme, active }) => (active ? theme.bg1 : theme.bg3)}; color: ${({ theme, active }) => (active ? theme.text1 : theme.text2)}; user-select: none; :hover { cursor: pointer; opacity: 0.7; } `; export default function Manage({ onDismiss, setModalView, setImportList, setImportToken, setListUrl, }: { onDismiss: () => void; setModalView: (view: CurrencyModalView) => void; setImportToken: (token: Token) => void; setImportList: (list: TokenList) => void; setListUrl: (url: string) => void; }) { // toggle between tokens and lists const [showLists, setShowLists] = useState(true); return ( setModalView(CurrencyModalView.search)} /> Manage setShowLists(!showLists)} active={showLists} > Lists setShowLists(!showLists)} active={!showLists} > Tokens {showLists ? ( ) : ( )} ); }