import React from "react"; import { useIntl } from "react-intl"; import { Button, InputGroup, Form } from "react-bootstrap"; import { Icon } from "./Icon"; import { FormikHandlers } from "formik"; import { faFileDownload } from "@fortawesome/free-solid-svg-icons"; import { IStringListInputProps, StringInput, StringListInput, } from "./StringListInput"; interface IProps { value: string; name: string; onChange: FormikHandlers["handleChange"]; onBlur: FormikHandlers["handleBlur"]; onScrapeClick(): void; urlScrapable(url: string): boolean; isInvalid?: boolean; } export const URLField: React.FC = (props: IProps) => { const intl = useIntl(); return ( ); }; interface IURLListProps extends IStringListInputProps { onScrapeClick?: (url: string) => void; urlScrapable?: (url: string) => boolean; } export const URLListInput: React.FC = ( listProps: IURLListProps ) => { const intl = useIntl(); const { onScrapeClick, urlScrapable } = listProps; return ( { if (!onScrapeClick || !urlScrapable) { return <>; } return ( ); }} /> ); };