Skip to content

Commit

Permalink
Undo unnecessary EuiSmallButton* uses
Browse files Browse the repository at this point in the history
Signed-off-by: Miki <[email protected]>
  • Loading branch information
AMoo-Miki committed Jul 22, 2024
1 parent b4afe2a commit 0fc1b9d
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@

import React from 'react';
import _ from 'lodash';
import { EuiSmallButtonEmpty } from '@elastic/eui';
import { EuiButtonEmpty } from '@elastic/eui';
import { FORMIK_INITIAL_TRIGGER_CONDITION_VALUES } from '../../containers/CreateTrigger/utils/constants';

const AddTriggerConditionButton = ({ arrayHelpers, disabled }) => {
return (
<EuiSmallButtonEmpty
<EuiButtonEmpty
onClick={() => arrayHelpers.push(_.cloneDeep(FORMIK_INITIAL_TRIGGER_CONDITION_VALUES))}
disabled={disabled}
size={'xs'}
data-test-subj="addTriggerConditionButton"
>
+ Add condition
</EuiSmallButtonEmpty>
</EuiButtonEmpty>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import React from 'react';
import { Field } from 'formik';
import _ from 'lodash';
import {
EuiSmallButton,
EuiButton,
EuiCodeEditor,
EuiFlexGroup,
EuiFlexItem,
Expand Down Expand Up @@ -138,13 +138,13 @@ const BucketLevelTriggerQuery = ({
</EuiFlexItem>
</EuiFlexGroup>

<EuiSmallButton
<EuiButton
onClick={() => onRun(_.isArray(trigger) ? trigger : [trigger])}
size={'s'}
style={{ marginLeft: '10px' }}
>
Preview condition response
</EuiSmallButton>
</EuiButton>
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import React from 'react';
import { Field } from 'formik';
import _ from 'lodash';
import {
EuiSmallButton,
EuiButton,
EuiCodeEditor,
EuiFlexGroup,
EuiFlexItem,
Expand Down Expand Up @@ -155,9 +155,9 @@ const TriggerQuery = ({
</EuiFlexItem>
</EuiFlexGroup>

<EuiSmallButton onClick={() => onRun([trigger])} size={'s'} style={{ marginLeft: '10px' }}>
<EuiButton onClick={() => onRun([trigger])} size={'s'} style={{ marginLeft: '10px' }}>
Preview condition response
</EuiSmallButton>
</EuiButton>
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import _ from 'lodash';
import { EuiAccordion, EuiSmallButton, EuiSpacer, EuiText, EuiTitle } from '@elastic/eui';
import { EuiAccordion, EuiButton, EuiSpacer, EuiText, EuiTitle } from '@elastic/eui';
import 'brace/mode/plain_text';
import { FormikFieldText, FormikSelect } from '../../../../components/FormControls';
import { hasError, isInvalid } from '../../../../utils/validate';
Expand Down Expand Up @@ -294,15 +294,15 @@ class DefineBucketLevelTrigger extends Component {
}
initialIsOpen={edit ? false : triggerIndex === 0}
extraAction={
<EuiSmallButton
<EuiButton
color={'danger'}
onClick={() => {
triggerArrayHelpers.remove(triggerIndex);
}}
size={'s'}
>
Remove trigger
</EuiSmallButton>
</EuiButton>
}
style={{ paddingBottom: '15px', paddingTop: '10px' }}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ class DefineCompositeLevelTrigger extends Component {
}
initialIsOpen={edit ? false : triggerIndex === 0}
extraAction={
<EuiSmallButton
<EuiButton
color={'danger'}
onClick={() => {
triggerArrayHelpers.remove(triggerIndex);
}}
size={'s'}
>
Remove trigger
</EuiSmallButton>
</EuiButton>
}
style={{ paddingBottom: '15px', paddingTop: '10px' }}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
EuiText,
EuiAccordion,
EuiHorizontalRule,
EuiSmallButtonIcon,
EuiButtonIcon,
EuiToolTip,
} from '@elastic/eui';
import TriggerNotificationsContent from './TriggerNotificationsContent';
Expand Down Expand Up @@ -118,7 +118,7 @@ const TriggerNotifications = ({
paddingSize={'s'}
extraAction={
<EuiToolTip content={'Remove notification'}>
<EuiSmallButtonIcon
<EuiButtonIcon
color={'danger'}
aria-label={'Delete notification'}
iconType={'trash'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import _ from 'lodash';
import { FieldArray } from 'formik';
import {
EuiAccordion,
EuiSmallButton,
EuiSmallButtonEmpty,
EuiButton,
EuiButtonEmpty,
EuiSpacer,
EuiText,
EuiTitle,
Expand Down Expand Up @@ -221,7 +221,7 @@ class DefineDocumentLevelTrigger extends Component {

<EuiSpacer size={'s'} />

<EuiSmallButtonEmpty
<EuiButtonEmpty
onClick={() =>
conditionsArrayHelpers.push(_.cloneDeep(FORMIK_INITIAL_TRIGGER_CONDITION_VALUES))
}
Expand All @@ -230,7 +230,7 @@ class DefineDocumentLevelTrigger extends Component {
data-test-subj={`addTriggerConditionButton`}
>
+ Add condition
</EuiSmallButtonEmpty>
</EuiButtonEmpty>
{inputLimitText(
_.get(triggerValues, `${fieldPath}triggerConditions`, []).length,
MAX_TRIGGER_CONDITIONS,
Expand Down Expand Up @@ -266,15 +266,15 @@ class DefineDocumentLevelTrigger extends Component {
}
initialIsOpen={edit ? false : triggerIndex === 0}
extraAction={
<EuiSmallButton
<EuiButton
color={'danger'}
onClick={() => {
triggerArrayHelpers.remove(triggerIndex);
}}
size={'s'}
>
Remove trigger
</EuiSmallButton>
</EuiButton>
}
style={{ paddingBottom: '15px', paddingTop: '10px' }}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import PropTypes from 'prop-types';
import _ from 'lodash';
import {
EuiAccordion,
EuiSmallButton,
EuiButton,
EuiCallOut,
EuiSpacer,
EuiText,
Expand Down Expand Up @@ -272,15 +272,15 @@ class DefineTrigger extends Component {
}
initialIsOpen={edit ? false : triggerIndex === 0}
extraAction={
<EuiSmallButton
<EuiButton
color={'danger'}
onClick={() => {
triggerArrayHelpers.remove(triggerIndex);
}}
size={'s'}
>
Remove trigger
</EuiSmallButton>
</EuiButton>
}
style={{ paddingBottom: '15px', paddingTop: '10px' }}
>
Expand Down

0 comments on commit 0fc1b9d

Please sign in to comment.