2021-09-12 16:36:43 +00:00
|
|
|
import { noop } from "lodash";
|
|
|
|
|
import React from "react";
|
|
|
|
|
import styled from "styled-components";
|
|
|
|
|
import Button, { Category, Size } from "components/ads/Button";
|
|
|
|
|
import Toggle from "components/ads/Toggle";
|
|
|
|
|
import {
|
|
|
|
|
AllowToggle,
|
|
|
|
|
AllowToggleLabel,
|
|
|
|
|
AllowToggleWrapper,
|
|
|
|
|
ButtonWrapper,
|
|
|
|
|
FormBodyWrapper,
|
|
|
|
|
FormHeaderIndex,
|
|
|
|
|
FormHeaderLabel,
|
|
|
|
|
FormHeaderWrapper,
|
|
|
|
|
} from "./common";
|
|
|
|
|
import { memo } from "react";
|
2021-10-06 06:11:25 +00:00
|
|
|
import {
|
|
|
|
|
createMessage,
|
|
|
|
|
WELCOME_FORM_NEWLETTER_HEADER,
|
|
|
|
|
WELCOME_FORM_NEWLETTER_LABEL,
|
|
|
|
|
WELCOME_FORM_SUBMIT_LABEL,
|
|
|
|
|
} from "constants/messages";
|
2021-09-12 16:36:43 +00:00
|
|
|
|
|
|
|
|
export const StyledButton = styled(Button)`
|
|
|
|
|
width: 201px;
|
|
|
|
|
height: 38px;
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
const NewsletterContainer = styled.div`
|
|
|
|
|
widht: 100%;
|
|
|
|
|
position: relative;
|
|
|
|
|
padding-left: ${(props) => props.theme.spaces[17] * 2}px;
|
|
|
|
|
margin-top: ${(props) => props.theme.spaces[12] * 2}px;
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export default memo(function NewsletterForm() {
|
|
|
|
|
return (
|
|
|
|
|
<NewsletterContainer>
|
|
|
|
|
<FormHeaderWrapper>
|
|
|
|
|
<FormHeaderIndex>3.</FormHeaderIndex>
|
2021-10-06 06:11:25 +00:00
|
|
|
<FormHeaderLabel>
|
|
|
|
|
{createMessage(WELCOME_FORM_NEWLETTER_HEADER)}
|
|
|
|
|
</FormHeaderLabel>
|
2021-09-12 16:36:43 +00:00
|
|
|
</FormHeaderWrapper>
|
|
|
|
|
<FormBodyWrapper>
|
|
|
|
|
<AllowToggleWrapper>
|
|
|
|
|
<AllowToggle>
|
2021-10-29 09:10:30 +00:00
|
|
|
<Toggle
|
|
|
|
|
className="t--welcome-form-newsletter"
|
|
|
|
|
name="signupForNewsletter"
|
|
|
|
|
onToggle={() => noop}
|
|
|
|
|
value
|
|
|
|
|
/>
|
2021-09-12 16:36:43 +00:00
|
|
|
</AllowToggle>
|
|
|
|
|
<AllowToggleLabel>
|
2021-10-06 06:11:25 +00:00
|
|
|
{createMessage(WELCOME_FORM_NEWLETTER_LABEL)}
|
2021-09-12 16:36:43 +00:00
|
|
|
</AllowToggleLabel>
|
|
|
|
|
</AllowToggleWrapper>
|
|
|
|
|
<ButtonWrapper>
|
|
|
|
|
<StyledButton
|
|
|
|
|
category={Category.primary}
|
2021-10-29 09:10:30 +00:00
|
|
|
className="t--welcome-form-create-button"
|
2021-09-12 16:36:43 +00:00
|
|
|
size={Size.medium}
|
|
|
|
|
tag="button"
|
2021-10-06 06:11:25 +00:00
|
|
|
text={createMessage(WELCOME_FORM_SUBMIT_LABEL)}
|
2021-09-12 16:36:43 +00:00
|
|
|
/>
|
|
|
|
|
</ButtonWrapper>
|
|
|
|
|
</FormBodyWrapper>
|
|
|
|
|
</NewsletterContainer>
|
|
|
|
|
);
|
|
|
|
|
});
|