Make the fields the same width

[MAILPOET-3502]
This commit is contained in:
Pavel Dohnal
2021-11-29 15:27:05 +01:00
committed by Veljko V
parent 96f19daa6f
commit a52b669af3
2 changed files with 56 additions and 48 deletions

View File

@@ -4,6 +4,7 @@ import { useDispatch, useSelect } from '@wordpress/data';
import MailPoet from 'mailpoet';
import Select from 'common/form/select/select';
import { Grid } from 'common/grid';
import ReactSelect from 'common/form/react_select/react_select';
import {
@@ -61,8 +62,10 @@ export const SubscribedToList: React.FunctionComponent<Props> = ({ filterIndex }
return (
<>
<Grid.CenteredRow>
<Select
key="select"
isFullWidth
value={segment.operator}
onChange={(e) => {
updateSegmentFilterFromEvent('operator', filterIndex, e);
@@ -72,6 +75,8 @@ export const SubscribedToList: React.FunctionComponent<Props> = ({ filterIndex }
<option value={AnyValueTypes.ALL}>{MailPoet.I18n.t('allOf')}</option>
<option value={AnyValueTypes.NONE}>{MailPoet.I18n.t('noneOf')}</option>
</Select>
</Grid.CenteredRow>
<Grid.CenteredRow>
<ReactSelect
dimension="small"
isFullWidth
@@ -95,6 +100,7 @@ export const SubscribedToList: React.FunctionComponent<Props> = ({ filterIndex }
);
}}
/>
</Grid.CenteredRow>
</>
);
};

View File

@@ -135,6 +135,7 @@ export const Form: React.FunctionComponent<Props> = ({
{MinusIcon}
</a>
)}
<Grid.CenteredRow>
<Select
dimension="small"
placeholder={MailPoet.I18n.t('selectActionPlaceholder')}
@@ -149,6 +150,7 @@ export const Form: React.FunctionComponent<Props> = ({
automationId="select-segment-action"
isFullWidth
/>
</Grid.CenteredRow>
{filterRow.index !== undefined && (
<FormFilterFields filterIndex={filterRow.index} />
)}