1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-30 16:09:38 +02:00

Add and delete custom search provider actions and controllers

This commit is contained in:
unknown 2021-10-11 13:03:31 +02:00
parent 459523dfd2
commit a885440fef
15 changed files with 392 additions and 82 deletions

View file

@ -0,0 +1,59 @@
import { useState } from 'react';
import Button from '../../../UI/Buttons/Button/Button';
import InputGroup from '../../../UI/Forms/InputGroup/InputGroup';
import ModalForm from '../../../UI/Forms/ModalForm/ModalForm';
interface Props {
modalHandler: () => void;
// addApp: (formData: NewApp | FormData) => any;
// updateApp: (id: number, formData: NewApp | FormData) => any;
// app?: App;
}
const QueriesForm = (props: Props): JSX.Element => {
const [formData, setFormData] = useState();
return (
<ModalForm modalHandler={props.modalHandler} formHandler={() => {}}>
<InputGroup>
<label htmlFor="name">Name</label>
<input
type="text"
name="name"
id="name"
placeholder="Google"
required
// value={formData.name}
// onChange={(e) => inputChangeHandler(e)}
/>
</InputGroup>
<InputGroup>
<label htmlFor="name">Prefix</label>
<input
type="text"
name="name"
id="name"
placeholder="g"
required
// value={formData.name}
// onChange={(e) => inputChangeHandler(e)}
/>
</InputGroup>
<InputGroup>
<label htmlFor="name">Query Template</label>
<input
type="text"
name="name"
id="name"
placeholder="https://www.google.com/search?q="
required
// value={formData.name}
// onChange={(e) => inputChangeHandler(e)}
/>
</InputGroup>
<Button>Add provider</Button>
</ModalForm>
);
};
export default QueriesForm;