Skip to content

Commit

Permalink
conditional remove empty div, change callout size to stop modal chang…
Browse files Browse the repository at this point in the history
…ing size, anon function callback for enableStore, translations use correct type
  • Loading branch information
CAWilson94 committed Nov 11, 2024
1 parent a3b9d2f commit 6f3aafc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export const EntityStoreEnablementModal: React.FC<EntityStoreEnablementModalProp
}
const proceedWarning = (
<EuiCallOut
size="s"
color="danger"
css={css`
border-radius: ${euiTheme.border.radius.medium};
Expand Down Expand Up @@ -147,12 +148,12 @@ export const EntityStoreEnablementModal: React.FC<EntityStoreEnablementModalProp
</EuiModalBody>

<EuiModalFooter>
<EuiFlexGroup justifyContent="spaceBetween" alignItems="center">
<EuiFlexItem>{!enablementOptions && proceedWarning}</EuiFlexItem>
<EuiFlexGroup justifyContent="flexEnd" alignItems="center">
{!enablementOptions ? <EuiFlexItem>{proceedWarning}</EuiFlexItem> : null}
<EuiFlexItem grow={false}>
<EuiFlexGroup direction="row">
<EuiFlexGroup direction="row" justifyContent="flexEnd">
<EuiButtonEmpty onClick={() => toggle(false)}>{'Cancel'}</EuiButtonEmpty>
<EuiButton onClick={enableStore(enablements)} fill>
<EuiButton onClick={() => enableStore(enablements)} fill>
<FormattedMessage
id="xpack.securitySolution.entityAnalytics.enablements.modal.enable"
defaultMessage="Enable"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const ENABLEMENT_DESCRIPTION_BOTH = i18n.translate(
);

export const ENABLEMENT_WARNING_SELECT_TO_PROCEED = i18n.translate(
'xpack.securitySolution.entityAnalytics.entityStore.enablement.description.both',
'xpack.securitySolution.entityAnalytics.entityStore.enablement.description.enablementWarningMessage',
{
defaultMessage: 'Please enable at least one option to proceed.',
}
Expand Down

0 comments on commit 6f3aafc

Please sign in to comment.