import React, { useRef, forwardRef } from 'react'; import PropTypes from 'prop-types'; import { faCaretDown } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import Dropdown from '../Dropdown'; import StyledWrapper from './StyledWrapper'; import SaveRequestButton from '../SaveRequest'; const QueryUrl = ({value, onChange, handleRun, collections}) => { const dropdownTippyRef = useRef(); const viewProfile = () => {}; const Icon = forwardRef((props, ref) => { return (
GET
); }); const onDropdownCreate = (ref) => dropdownTippyRef.current = ref; return (
} placement='bottom-start'>
{ dropdownTippyRef.current.hide(); viewProfile(); }}> GET
{ dropdownTippyRef.current.hide(); viewProfile(); }}> POST
{ dropdownTippyRef.current.hide(); viewProfile(); }}> PUT
{ dropdownTippyRef.current.hide(); viewProfile(); }}> DELETE
{ dropdownTippyRef.current.hide(); viewProfile(); }}> PATCH
{ dropdownTippyRef.current.hide(); viewProfile(); }}> OPTIONS
{ dropdownTippyRef.current.hide(); viewProfile(); }}> HEAD
onChange(event.target.value)} />
) }; QueryUrl.propTypes = { value: PropTypes.string, onChange: PropTypes.func.isRequired, handleRun: PropTypes.func.isRequired }; export default QueryUrl;