/
SOFG1
/
hasida
Обзор
Документация
Войти
/
SOFG1
/
hasida
Код
Запросы
0
Задачи
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/components/SignUpComponents/Step2Warning.tsx
37 строк
772 B
Eddy
initial commit
22 июл 2024, 17:14
22 июл 2024, 17:14
b43c0d0
Код
Авторство
О чём код?
import React from "react"; import styled from "styled-components"; import { Modal } from "../../UI/Modal"; import { useTranslation } from "react-i18next"; import { Button } from "../../UI/Button"; const StyledText = styled.p` max-width: 500px; text-align: center; margin-bottom: 15px; `; const StyledButton = styled(Button)` width: 100%; `; interface IProps { show: boolean; onClose: () => void; } const Step2Warning = React.memo(({ show, onClose }: IProps) => { const { t } = useTranslation(); if (!show) return null; return ( <Modal onClose={onClose}> <StyledText>{t("sign-up_warning")}</StyledText> <StyledButton onClick={onClose}> {t("i_agree")} </StyledButton> </Modal> ); }); export default Step2Warning;