Skip to content

Commit

Permalink
[Detection Engine] align optional label in rule about advanced settin…
Browse files Browse the repository at this point in the history
…gs section (elastic#190929)

## Summary

Addresses elastic#127860 .
  • Loading branch information
yctercero authored Sep 9, 2024
1 parent dc808a4 commit 409972e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ interface AddItemProps {
validate?: (args: unknown) => boolean;
}

const MyEuiFormRow = styled(EuiFormRow)`
.euiFormRow__labelWrapper {
.euiText {
padding-right: 32px;
}
}
`;

export const MyAddItemButton = styled(EuiButtonEmpty)`
margin: 4px 0px;
font-size: 12px;
Expand Down Expand Up @@ -130,7 +122,7 @@ export const AddItem = ({

const values = field.value as string[];
return (
<MyEuiFormRow
<EuiFormRow
label={field.label}
labelAppend={field.labelAppend}
error={showValidation ? errorMessage : null}
Expand Down Expand Up @@ -180,6 +172,6 @@ export const AddItem = ({
{addText}
</MyAddItemButton>
</>
</MyEuiFormRow>
</EuiFormRow>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ const MitreAttackContainer = styled.div`
margin-top: 16px;
`;

const InitialMitreAttackFormRow = styled(EuiFormRow)`
.euiFormRow__labelWrapper {
.euiText {
padding-right: 32px;
}
}
`;

interface AddItemProps {
field: FieldHook;
dataTestSubj: string; // eslint-disable-line react/no-unused-prop-types
Expand Down Expand Up @@ -174,14 +166,14 @@ export const AddMitreAttackThreat = memo(({ field, idAria, isDisabled }: AddItem
{values.map((threat, index) => (
<div key={index}>
{index === 0 ? (
<InitialMitreAttackFormRow
<EuiFormRow
fullWidth
label={`${field.label} ${i18n.THREATS}`}
labelAppend={field.labelAppend}
describedByIds={idAria ? [`${idAria} ${i18n.TACTIC}`] : undefined}
>
<>{getSelectTactic(threat, index, isDisabled)}</>
</InitialMitreAttackFormRow>
</EuiFormRow>
) : (
<EuiFormRow
fullWidth
Expand Down

0 comments on commit 409972e

Please sign in to comment.