Skip to content

Commit

Permalink
Added new exit mode design. Renamed animations
Browse files Browse the repository at this point in the history
  • Loading branch information
elizabetdev committed Jun 29, 2021
1 parent c6c6e78 commit 9137264
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 13 deletions.
4 changes: 2 additions & 2 deletions x-pack/plugins/maps/public/_animations.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@keyframes headShake {
@keyframes mapAnimationHeadShake {
0% {
transform: translateX(0);
}
Expand All @@ -24,7 +24,7 @@
}
}

@keyframes pulse {
@keyframes mapAnimationPulse {
from {
transform: scale3d(1, 1, 1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,22 @@

.mapTocEntry-isInEditingMode {
background-color: tintOrShade($euiColorPrimary, 90%, 70%) !important;
font-size: $euiFontSizeXS;
font-weight: $euiFontWeightMedium;

&__row {
margin-left: $euiSizeL;
display: inline-flex;
align-items: center;

> * {
margin-right: $euiSizeXS;
}
}

&__editFeatureText {
line-height: 1;
padding-right: $euiSizeXS;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import React, { Component } from 'react';
import classNames from 'classnames';
import type { DraggableProvidedDragHandleProps } from 'react-beautiful-dnd';
import { FormattedMessage } from '@kbn/i18n/react';
import { EuiIcon, EuiButtonIcon, EuiConfirmModal, EuiButtonEmpty } from '@elastic/eui';
import { EuiIcon, EuiButtonIcon, EuiConfirmModal, EuiButtonEmpty, EuiText } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { TOCEntryActionsPopover } from './toc_entry_actions_popover';
import {
Expand Down Expand Up @@ -336,16 +336,17 @@ export class TOCEntry extends Component<Props, State> {

{this.props.editModeActiveForLayer && (
<div className="mapTocEntry-isInEditingMode__row">
<EuiButtonEmpty
size="xs"
color="danger"
iconType="vector"
flush="left"
onClick={this.props.cancelEditing}
>
<EuiIcon type="vector" size="s" />
<span className="mapTocEntry-isInEditingMode__editFeatureText">
<FormattedMessage
id="xpack.maps.layerControl.tocEntry.EditFeature"
defaultMessage="Edit feature"
/>
</span>
<EuiButtonEmpty size="xs" flush="both" onClick={this.props.cancelEditing}>
<FormattedMessage
id="xpack.maps.layerControl.tocEntry.exitEditModeAriaLabel"
defaultMessage="Exit feature editing"
defaultMessage="Exit"
/>
</EuiButtonEmpty>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ $timesliderWidth: 585px;
}

.mapTimeslider--animation {
animation: pulse .6s ease-in-out;
animation: mapAnimationPulse .6s ease-in-out;
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}

.mapToolbarOverlay__buttonGroupAnimated {
animation: headShake 1.2s ease-in-out;
animation: mapAnimationHeadShake 1.2s ease-in-out;
}

.mapToolbarOverlay__button__exit {
Expand Down

0 comments on commit 9137264

Please sign in to comment.