diff --git a/CHANGELOG.md b/CHANGELOG.md index ec52b5face0..7c7fde62c68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # [`master`](https://github.com/elastic/eui/tree/master) -No public interface changes since `0.0.26`. +- Don't propagate a null `onClick` on EuiPanels ([#473](https://github.com/elastic/eui/pull/473)) +- Use 1.1px for the `EuiHorizontalRule` height, in order to work around strange Chrome height calculations ([#473](https://github.com/elastic/eui/pull/473)) # [`0.0.26`](https://github.com/elastic/eui/tree/v0.0.26) diff --git a/src/components/horizontal_rule/_horizontal_rule.scss b/src/components/horizontal_rule/_horizontal_rule.scss index 5eca2cc5287..4e903a07051 100644 --- a/src/components/horizontal_rule/_horizontal_rule.scss +++ b/src/components/horizontal_rule/_horizontal_rule.scss @@ -1,6 +1,8 @@ .euiHorizontalRule { border: none; - height: 1px; + // Sometimes Chrome "calculates" an element height of e.g. 0.990px, which it + // rounds down, thereby hiding the element. + height: 1.1px; background-color: $euiBorderColor; &.euiHorizontalRule--full { diff --git a/src/components/panel/panel.js b/src/components/panel/panel.js index 1b1b32ca692..495f65cec3e 100644 --- a/src/components/panel/panel.js +++ b/src/components/panel/panel.js @@ -35,13 +35,19 @@ export const EuiPanel = ({ const PanelTag = onClick ? 'button' : 'div'; + const props = { + ref: panelRef, + className: classes + } + + // Avoid passing down this prop if it hasn't been supplied, in order to + // avoid noise in react-test-renderer snapshots. + if (onClick != null) { + props.onClick = onClick + } + return ( - + {children} );