Add weeks and months to the scheduling component
[MAILPOET-3763]
This commit is contained in:
@@ -18,6 +18,7 @@ declare let window: ReengagementWindow;
|
||||
export function NewsletterTypeReEngagement(): JSX.Element {
|
||||
const [options] = useState({
|
||||
afterTimeNumber: window.settings.deactivate_subscriber_after_inactive_days,
|
||||
afterTimeType: 'months',
|
||||
});
|
||||
return (
|
||||
<div>
|
||||
@@ -28,6 +29,7 @@ export function NewsletterTypeReEngagement(): JSX.Element {
|
||||
<Grid.Column align="center" className="mailpoet-schedule-email">
|
||||
<Scheduling
|
||||
afterTimeNumber={options.afterTimeNumber}
|
||||
afterTimeType={options.afterTimeType}
|
||||
/>
|
||||
|
||||
<Button
|
||||
|
@@ -2,12 +2,14 @@ import React from 'react';
|
||||
import MailPoet from 'mailpoet';
|
||||
import Heading from 'common/typography/heading/heading';
|
||||
import Input from 'common/form/input/input';
|
||||
import Select from 'common/form/select/select';
|
||||
|
||||
interface Props {
|
||||
afterTimeNumber: string;
|
||||
afterTimeType: string;
|
||||
}
|
||||
|
||||
export function Scheduling({ afterTimeNumber }: Props): JSX.Element {
|
||||
export function Scheduling({ afterTimeNumber, afterTimeType }: Props): JSX.Element {
|
||||
return (
|
||||
<>
|
||||
<Heading level={4}>{MailPoet.I18n.t('selectEventToSendReEngagementEmail')}</Heading>
|
||||
@@ -21,6 +23,10 @@ export function Scheduling({ afterTimeNumber }: Props): JSX.Element {
|
||||
value={afterTimeNumber}
|
||||
dimension="small"
|
||||
/>
|
||||
<Select isMinWidth value={afterTimeType}>
|
||||
<option value="weeks">weeks</option>
|
||||
<option value="months">months</option>
|
||||
</Select>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
Reference in New Issue
Block a user