From 6d6e4f844363843d254732ff0f64096f172ed505 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Mon, 4 Jun 2018 15:25:42 -0700 Subject: [PATCH] Normalize DOM structure of EuiFormControlLayoutCustomIcon. --- .../form_control_layout.test.js.snap | 152 ++++++++++-------- .../form_control_layout_custom_icon.js | 15 +- 2 files changed, 94 insertions(+), 73 deletions(-) diff --git a/src/components/form/form_control_layout/__snapshots__/form_control_layout.test.js.snap b/src/components/form/form_control_layout/__snapshots__/form_control_layout.test.js.snap index 25d86d36c042..8e008cca1a80 100644 --- a/src/components/form/form_control_layout/__snapshots__/form_control_layout.test.js.snap +++ b/src/components/form/form_control_layout/__snapshots__/form_control_layout.test.js.snap @@ -59,25 +59,29 @@ exports[`EuiFormControlLayout props icon is rendered as a string 1`] = `
- + + + + + +
`; @@ -89,26 +93,30 @@ exports[`EuiFormControlLayout props icon is rendered as an object 1`] = `
- + + + + + +
`; @@ -120,25 +128,29 @@ exports[`EuiFormControlLayout props icon side left is rendered 1`] = `
- + + + + + +
`; @@ -150,25 +162,29 @@ exports[`EuiFormControlLayout props icon side right is rendered 1`] = `
- + + + + + +
`; diff --git a/src/components/form/form_control_layout/form_control_layout_custom_icon.js b/src/components/form/form_control_layout/form_control_layout_custom_icon.js index cc2d8c4b16e0..02fb60bb8535 100644 --- a/src/components/form/form_control_layout/form_control_layout_custom_icon.js +++ b/src/components/form/form_control_layout/form_control_layout_custom_icon.js @@ -22,13 +22,14 @@ export const EuiFormControlLayoutCustomIcon = ({ if (onClick) { return ( @@ -36,12 +37,16 @@ export const EuiFormControlLayoutCustomIcon = ({ } return ( -