mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Security Solution] Test rule_details_ui/pages/rule_details/index.test.tsx logs a warning about wrong props passed to EuiSwitch (#162229)
## Summary Related ticket: https://github.com/elastic/kibana/issues/147065 This PR fixes the warning within the `rule_details_ui/pages/rule_details/index.test.tsx` test which happens because instead of using required `EuiSwitch`'s `label` field we pass `undefined`. Since, we do not intend to show the label we make it explicitly with `showLabel={false}` and set `label` to an empty string. For more details see [the overview of the EuiSwitch](https://elastic.github.io/eui/#/forms/selection-controls) component.
This commit is contained in:
parent
3b75103f2b
commit
4fa42f7211
1 changed files with 2 additions and 1 deletions
|
@ -88,7 +88,8 @@ export const RuleSwitchComponent = ({
|
|||
) : (
|
||||
<StaticSwitch
|
||||
data-test-subj="ruleSwitch"
|
||||
label={undefined}
|
||||
showLabel={false}
|
||||
label=""
|
||||
disabled={isDisabled}
|
||||
checked={enabled}
|
||||
onChange={onRuleStateChange}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue