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 MailPoet from 'mailpoet';
import Select from 'common/form/select/select'; import Select from 'common/form/select/select';
import { Grid } from 'common/grid';
import ReactSelect from 'common/form/react_select/react_select'; import ReactSelect from 'common/form/react_select/react_select';
import { import {
@@ -61,8 +62,10 @@ export const SubscribedToList: React.FunctionComponent<Props> = ({ filterIndex }
return ( return (
<> <>
<Grid.CenteredRow>
<Select <Select
key="select" key="select"
isFullWidth
value={segment.operator} value={segment.operator}
onChange={(e) => { onChange={(e) => {
updateSegmentFilterFromEvent('operator', filterIndex, 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.ALL}>{MailPoet.I18n.t('allOf')}</option>
<option value={AnyValueTypes.NONE}>{MailPoet.I18n.t('noneOf')}</option> <option value={AnyValueTypes.NONE}>{MailPoet.I18n.t('noneOf')}</option>
</Select> </Select>
</Grid.CenteredRow>
<Grid.CenteredRow>
<ReactSelect <ReactSelect
dimension="small" dimension="small"
isFullWidth 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} {MinusIcon}
</a> </a>
)} )}
<Grid.CenteredRow>
<Select <Select
dimension="small" dimension="small"
placeholder={MailPoet.I18n.t('selectActionPlaceholder')} placeholder={MailPoet.I18n.t('selectActionPlaceholder')}
@@ -149,6 +150,7 @@ export const Form: React.FunctionComponent<Props> = ({
automationId="select-segment-action" automationId="select-segment-action"
isFullWidth isFullWidth
/> />
</Grid.CenteredRow>
{filterRow.index !== undefined && ( {filterRow.index !== undefined && (
<FormFilterFields filterIndex={filterRow.index} /> <FormFilterFields filterIndex={filterRow.index} />
)} )}