feat: add toaster
This commit is contained in:
1
src/widgets/footer-form/index.ts
Normal file
1
src/widgets/footer-form/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { default as FooterForm } from './ui';
|
||||
45
src/widgets/footer-form/styles.module.scss
Normal file
45
src/widgets/footer-form/styles.module.scss
Normal file
@@ -0,0 +1,45 @@
|
||||
.Form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: rem(20px);
|
||||
width: 100%;
|
||||
|
||||
@include iftablet {
|
||||
width: unset;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@include iflaptop {
|
||||
max-width: 60%;
|
||||
}
|
||||
|
||||
@include ifdesktop {
|
||||
max-width: 60%;
|
||||
}
|
||||
|
||||
.Header {
|
||||
font-family: $font-open-sans;
|
||||
font-weight: $font-semi-bold;
|
||||
font-size: rem(28px);
|
||||
line-height: 100%;
|
||||
color: $color-white;
|
||||
margin-bottom: rem(30px);
|
||||
|
||||
@include iflaptop {
|
||||
font-size: rem(42px);
|
||||
margin-bottom: rem(30px);
|
||||
}
|
||||
|
||||
@include ifdesktop {
|
||||
font-size: rem(60px);
|
||||
margin-bottom: rem(40px);
|
||||
}
|
||||
}
|
||||
|
||||
.SendBtn {
|
||||
align-self: flex-end;
|
||||
max-width: 33%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
30
src/widgets/footer-form/ui.tsx
Normal file
30
src/widgets/footer-form/ui.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
'use client';
|
||||
|
||||
import s from './styles.module.scss';
|
||||
import { Button, Input, Mark, TextArea } from '@shared/ui';
|
||||
import toast from 'react-hot-toast';
|
||||
|
||||
export default function FooterForm() {
|
||||
const notify = () => toast.success('Заявка на консультацию принята');
|
||||
|
||||
return (
|
||||
<form className={s.Form}>
|
||||
<h2 className={s.Header}>
|
||||
Давайте <Mark>обсудим</Mark> ваши задачи
|
||||
</h2>
|
||||
<Input variant='ghost' placeholder={'Ваше имя'} fullWidth />
|
||||
<Input variant='ghost' placeholder={'+7 999 1234567'} fullWidth />
|
||||
<TextArea
|
||||
variant='ghost'
|
||||
placeholder={'Кратко опишите вашу задачу'}
|
||||
fullWidth
|
||||
id='story'
|
||||
name='story'
|
||||
rows={6}
|
||||
/>
|
||||
<Button className={s.SendBtn} variant='orange' fullWidth onClick={notify}>
|
||||
Отправить
|
||||
</Button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user