Skip to content

Commit

Permalink
Test change
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaindik committed Dec 17, 2024
1 parent b6a9d92 commit 02655ec
Showing 1 changed file with 1 addition and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@
*/

import React from 'react';
import { EuiAutoSizer } from '@elastic/eui';
import { useDiffableRuleDataView } from '../hooks/use_diffable_rule_data_view';
import type { DiffableRule } from '../../../../../../../../../common/api/detection_engine';
import { ThresholdEdit } from '../../../../../../../rule_creation/components/threshold_edit';

const MIN_ROW_LAYOUT_WIDTH = 560;

interface ThresholdAdapterProps {
finalDiffableRule: DiffableRule;
}
Expand All @@ -22,17 +19,5 @@ export function ThresholdAdapter({ finalDiffableRule }: ThresholdAdapterProps):

const esFields = dataView?.fields || [];

return (
<EuiAutoSizer disableHeight>
{(size) => (
<div style={{ width: `${size.width}px` }}>
<ThresholdEdit
path="threshold"
esFields={esFields}
direction={size.width < MIN_ROW_LAYOUT_WIDTH ? 'column' : 'row'}
/>
</div>
)}
</EuiAutoSizer>
);
return <ThresholdEdit path="threshold" esFields={esFields} />;
}

0 comments on commit 02655ec

Please sign in to comment.