import React from "react"; import styled from "styled-components/macro"; import { Currency, CurrencyAmount } from "@uniswap/sdk-core"; import { Input as NumericalInput } from "../NumericalInput"; import { TYPE } from "../../theme"; import { RowFixed } from "../Row"; import { MouseoverTooltip } from "../Tooltip"; import { useCurrency } from "../../hooks/Tokens"; const InputPanel = styled.div<{ hideInput?: boolean }>` ${({ theme }) => theme.flexColumnNoWrap} position: relative; border-radius: ${({ hideInput }) => (hideInput ? "16px" : "20px")}; background-color: ${({ theme, hideInput }) => hideInput ? "transparent" : theme.bg2}; z-index: 1; width: ${({ hideInput }) => (hideInput ? "100%" : "initial")}; `; const Container = styled.div<{ hideInput: boolean }>` border-radius: ${({ hideInput }) => (hideInput ? "16px" : "20px")}; border: 1px solid ${({ theme, hideInput }) => (hideInput ? " transparent" : theme.bg2)}; background-color: ${({ theme }) => theme.bg1}; width: ${({ hideInput }) => (hideInput ? "100%" : "initial")}; :focus, :hover { border: 1px solid ${({ theme, hideInput }) => (hideInput ? " transparent" : theme.bg3)}; } `; const InputRow = styled.div` ${({ theme }) => theme.flexRowNoWrap} align-items: center; padding: 1rem 1rem 0.75rem 1rem; `; interface FeeInputPanelProps { value: CurrencyAmount; onUserInput: (value: string) => void; hideInput?: boolean; id: string; } export default function FeeInputPanel({ value, id, hideInput = false, onUserInput, ...rest }: FeeInputPanelProps) { const nativeCurrency = useCurrency("NATIVE"); return ( {"Max fee"} {!hideInput && ( { onUserInput(val); }} /> )} {nativeCurrency?.symbol} ); }