Skip to content

Commit bbaf56c

Browse files
[Maps] fix attribution overflow with exit full screen button (#62699)
* [Maps] fix attribution overflow with exit full screen button * use margin-left instead of padding-left Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent 16a26c2 commit bbaf56c

3 files changed

Lines changed: 12 additions & 1 deletion

File tree

x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/attribution_control/_attribution_control.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@
44
pointer-events: all;
55
padding-left: $euiSizeM;
66
}
7+
8+
.mapAttributionControl__fullScreen {
9+
margin-left: $euiSizeXXL * 4;
10+
}

x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/attribution_control/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
import { connect } from 'react-redux';
88
import { AttributionControl } from './view';
99
import { getLayerList } from '../../../selectors/map_selectors';
10+
import { getIsFullScreen } from '../../../selectors/ui_selectors';
1011

1112
function mapStateToProps(state = {}) {
1213
return {
1314
layerList: getLayerList(state),
15+
isFullScreen: getIsFullScreen(state),
1416
};
1517
}
1618

x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/attribution_control/view.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import React, { Fragment } from 'react';
88
import _ from 'lodash';
99
import { EuiText, EuiLink } from '@elastic/eui';
10+
import classNames from 'classnames';
1011

1112
export class AttributionControl extends React.Component {
1213
state = {
@@ -86,7 +87,11 @@ export class AttributionControl extends React.Component {
8687
return null;
8788
}
8889
return (
89-
<div className="mapAttributionControl">
90+
<div
91+
className={classNames('mapAttributionControl', {
92+
mapAttributionControl__fullScreen: this.props.isFullScreen,
93+
})}
94+
>
9095
<EuiText size="xs">
9196
<small>
9297
<strong>{this._renderAttributions()}</strong>

0 commit comments

Comments
 (0)