feat: add feedback page and checkbox with text component
This commit is contained in:
parent
3aa71f4686
commit
e7f0a4485d
21
src/components/CheckboxWithText/index.tsx
Normal file
21
src/components/CheckboxWithText/index.tsx
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import styles from "./styles.module.css"
|
||||||
|
|
||||||
|
export type CheckboxWithTextProps = {
|
||||||
|
text: string
|
||||||
|
onChange?: (value: React.FormEvent<HTMLInputElement>) => void
|
||||||
|
}
|
||||||
|
|
||||||
|
function CheckboxWithText({ text, onChange }: CheckboxWithTextProps): JSX.Element {
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={styles.container}>
|
||||||
|
<label className={styles["container__input"]}>
|
||||||
|
<input className={styles["container__checkbox"]} type="checkbox" onChange={onChange}/>
|
||||||
|
<span className={styles["container__checkmark"]}></span>
|
||||||
|
</label>
|
||||||
|
<span className={styles["container__text"]}>{text}</span>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default CheckboxWithText
|
||||||
77
src/components/CheckboxWithText/styles.module.css
Normal file
77
src/components/CheckboxWithText/styles.module.css
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
.container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container__input {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
padding-left: 27px;
|
||||||
|
margin-bottom: 27px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 22px;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* hover */
|
||||||
|
/* .container__input:hover .container__checkbox ~ .container__checkmark {
|
||||||
|
background-color: #ccc;
|
||||||
|
} */
|
||||||
|
|
||||||
|
.container__input .container__checkbox {
|
||||||
|
position: absolute;
|
||||||
|
opacity: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
height: 0;
|
||||||
|
width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container__input .container__checkbox:checked ~ .container__checkmark {
|
||||||
|
background-color: #878585;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container__checkmark {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
height: 25px;
|
||||||
|
width: 25px;
|
||||||
|
/* background-color: #878585; */
|
||||||
|
border: solid 2px #878585;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container__checkmark:after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container__input .container__checkbox:checked ~ .container__checkmark:after {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container__checkmark:after {
|
||||||
|
left: 7px;
|
||||||
|
top: 3px;
|
||||||
|
width: 5px;
|
||||||
|
height: 10px;
|
||||||
|
border: solid white;
|
||||||
|
border-width: 0 3px 3px 0;
|
||||||
|
-webkit-transform: rotate(45deg);
|
||||||
|
-ms-transform: rotate(45deg);
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.container__text {
|
||||||
|
text-align: left;
|
||||||
|
line-height: 1.2;
|
||||||
|
color: #878585;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
26
src/components/FeedbackPage/index.tsx
Normal file
26
src/components/FeedbackPage/index.tsx
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
import { useNavigate } from 'react-router-dom'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
import routes from '../../routes'
|
||||||
|
import styles from './styles.module.css'
|
||||||
|
import MainButton from '../MainButton'
|
||||||
|
|
||||||
|
function FeedbackPage(): JSX.Element {
|
||||||
|
const { t } = useTranslation()
|
||||||
|
const navigate = useNavigate()
|
||||||
|
const handleNext = () => navigate(routes.client.emailEnter())
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section className={`${styles.page} page`}>
|
||||||
|
<div className={styles.images}>
|
||||||
|
<img className={styles['profile-picture']} src="/profile-picture-feedback.png" alt="profile picture" />
|
||||||
|
<img className={styles.stars} src="/5-stars.png" alt="stop" />
|
||||||
|
</div>
|
||||||
|
<p className={styles.text}>{t('feedback')}</p>
|
||||||
|
<MainButton onClick={handleNext}>
|
||||||
|
{t('next')}
|
||||||
|
</MainButton>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default FeedbackPage
|
||||||
33
src/components/FeedbackPage/styles.module.css
Normal file
33
src/components/FeedbackPage/styles.module.css
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
.page {
|
||||||
|
flex: auto;
|
||||||
|
height: calc(100vh - 50px);
|
||||||
|
max-height: -webkit-fill-available;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.images {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-end;
|
||||||
|
gap: 18px;
|
||||||
|
width: 100%;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.profile-picture {
|
||||||
|
width: 96px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stars {
|
||||||
|
width: 116px;
|
||||||
|
margin-bottom: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
color: #000;
|
||||||
|
font-weight: 600;
|
||||||
|
padding: 18px;
|
||||||
|
background-color: #e2e0e0;
|
||||||
|
border-radius: 24px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user