mirror of
https://git.rdcenter.ru/RDCenter/skb-kit.git
synced 2026-12-05 03:29:45 +00:00
Изменил компонент контактной формы, теперь более гибкий в стилизации. Изменил стили под конкретные страницы для формы
This commit is contained in:
1 parent
9fa6b820fb
commit
439bfca774
5 files changed
+99
-59
No files matched your search
@@ -6,51 +6,43 @@ import "./ContactForm.styles.scss";
|
||||
|
||||
import { fileUpload } from "../../assets/images";
|
||||
|
||||
const mock = [
|
||||
{
|
||||
id: 1,
|
||||
type: "text",
|
||||
name: "name",
|
||||
placeholder: "Имя",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
type: "email",
|
||||
name: "email",
|
||||
placeholder: "E-mail",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
type: "textarea",
|
||||
name: "text",
|
||||
placeholder: "Опишите в этом поле свой проект и, по возможности, прикрепите файл с ТЗ",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
type: "file",
|
||||
name: "file",
|
||||
icon: fileUpload,
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
type: "submit",
|
||||
}
|
||||
];
|
||||
|
||||
function ContactForm({ fields = mock }) {
|
||||
function ContactForm() {
|
||||
return (
|
||||
<Form method="post" className="half contact-form">
|
||||
<h2>Свяжитесь с нами!</h2>
|
||||
<div className="inputs">
|
||||
{fields.map(item =>
|
||||
<div className="row">
|
||||
<Field
|
||||
key={item.id}
|
||||
type={item.type}
|
||||
name={item.name}
|
||||
placeholder={item.placeholder}
|
||||
icon={item.icon}
|
||||
key={1}
|
||||
type="text"
|
||||
name="name"
|
||||
placeholder="Имя"
|
||||
/>
|
||||
)}
|
||||
<Field
|
||||
key={2}
|
||||
type="email"
|
||||
name="email"
|
||||
placeholder="E-mail"
|
||||
/>
|
||||
</div>
|
||||
<Field
|
||||
key={3}
|
||||
type="textarea"
|
||||
name="text"
|
||||
placeholder="Опишите в этом поле свой проект и, по возможности, прикрепите файл с ТЗ"
|
||||
/>
|
||||
<div className="row">
|
||||
<Field
|
||||
key={4}
|
||||
type="file"
|
||||
name="file"
|
||||
icon={fileUpload}
|
||||
/>
|
||||
<Field
|
||||
key={5}
|
||||
type="submit"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</Form>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user