[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>
This commit is contained in:
Nathan Reese 2020-04-08 11:24:04 -06:00 committed by GitHub
parent 8cacbdfaa5
commit 3598b8c44c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 1 deletions

View file

@ -4,3 +4,7 @@
pointer-events: all; pointer-events: all;
padding-left: $euiSizeM; padding-left: $euiSizeM;
} }
.mapAttributionControl__fullScreen {
margin-left: $euiSizeXXL * 4;
}

View file

@ -7,10 +7,12 @@
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { AttributionControl } from './view'; import { AttributionControl } from './view';
import { getLayerList } from '../../../selectors/map_selectors'; import { getLayerList } from '../../../selectors/map_selectors';
import { getIsFullScreen } from '../../../selectors/ui_selectors';
function mapStateToProps(state = {}) { function mapStateToProps(state = {}) {
return { return {
layerList: getLayerList(state), layerList: getLayerList(state),
isFullScreen: getIsFullScreen(state),
}; };
} }

View file

@ -7,6 +7,7 @@
import React, { Fragment } from 'react'; import React, { Fragment } from 'react';
import _ from 'lodash'; import _ from 'lodash';
import { EuiText, EuiLink } from '@elastic/eui'; import { EuiText, EuiLink } from '@elastic/eui';
import classNames from 'classnames';
export class AttributionControl extends React.Component { export class AttributionControl extends React.Component {
state = { state = {
@ -86,7 +87,11 @@ export class AttributionControl extends React.Component {
return null; return null;
} }
return ( return (
<div className="mapAttributionControl"> <div
className={classNames('mapAttributionControl', {
mapAttributionControl__fullScreen: this.props.isFullScreen,
})}
>
<EuiText size="xs"> <EuiText size="xs">
<small> <small>
<strong>{this._renderAttributions()}</strong> <strong>{this._renderAttributions()}</strong>