2021-09-12 16:36:43 +00:00
|
|
|
import { noop } from "lodash";
|
|
|
|
|
import React from "react";
|
|
|
|
|
import styled from "styled-components";
|
feat: import changes batch 2 (#15722)
* Remove treedropdown from ads
* Change Treedropdown imports
* Remove Notification Banner, change imports
* Remove Toggle from ads
* Change toggle imports
* explicitly declare function argument types
* Remove Menu from ads
* Change menu imports
* Remove Spinner from ads
* Change spinner imports
* Remove Radio, import changes
* test: updated flaky test under default meta (#15707)
* updated flaky test
* Updated tests
* updated tests
* updated the tests
* updated tests
* Update constants.ts
* add more typecasting
* Remove ListSegmentHeader, import changes
* Remove TagInputComponent, import changes
* Remove Switch, import changes
* Remove SearchInput, change imports
* Rename TagInputComponent to TagInput
* Remove ProgressiveImage, import changes
* import changes for SearchVariant
* Remove menu divider, import changes
* Remove TableDropdown, import changes
* Remove Switcher
* Remove StatusBar, import changes
* Remove showcase carousel
* Remove RectangularSwitcher, import change
* Add types to TableDropdown's args
* Remove MultiSwitch, import change
* Remove GifPlayerComponent, import change
* Remove DraggableList, import change
* Remove DisplayImageUpload, import change
* Remove DatePickerComponent, import change
* Remove CopyToClipBoard, import change
* Remove ColorSelector, import change
* Remove TabItemBackgroundFill, NumberedStep, ColorPickerComponent
* GifPlayerComponent -> GifPlayer
* change named import
* Remove FormFieldError, change imports
* Update to new version of Tree Dropdown
* Fix issue with ads/index.ts
* Test file fix
* Fix issue with merge?!?!??
* update design system to 1.0.18
* Bump ds version
* bump ds version
* bump ds version
Co-authored-by: NandanAnantharamu <67676905+NandanAnantharamu@users.noreply.github.com>
Co-authored-by: Albin <albin@appsmith.com>
2022-09-02 08:38:17 +00:00
|
|
|
import { Button, Category, Toggle, Size } from "design-system";
|
2021-09-12 16:36:43 +00:00
|
|
|
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,
|
2022-02-11 18:08:46 +00:00
|
|
|
} from "@appsmith/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>
|
2021-11-26 06:16:08 +00:00
|
|
|
<FormHeaderWrapper className="relative flex-col items-start">
|
|
|
|
|
<FormHeaderIndex className="absolute -left-6">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)}
|
2022-03-11 11:21:58 +00:00
|
|
|
type="submit"
|
2021-09-12 16:36:43 +00:00
|
|
|
/>
|
|
|
|
|
</ButtonWrapper>
|
|
|
|
|
</FormBodyWrapper>
|
|
|
|
|
</NewsletterContainer>
|
|
|
|
|
);
|
|
|
|
|
});
|