-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(remove-compare): add remove compare data set button (#193)
* feat(data-set-info): display data set info in data mode * refactor(data-set-info): use reduce instead of forEach * style(data-set-info): remove console.log * refactor(data-set-info): add layer selector, rename selectedLayerSelector to selectedLayerIdsSelector * style(layer-selector): remove curly braces * refactor(selectors): move all selectors to separate folder * refactor(globes): rename selector const * refactor(layer-loader): rename selector const * feat(remove-compare): add remove compare-globe button
- Loading branch information
1 parent
4f95cc4
commit 102ff78
Showing
10 changed files
with
90 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,8 @@ | |
margin-top: 0 | ||
color: #fff | ||
font-size: 1em | ||
|
||
.buttons | ||
display: flex | ||
flex-direction: row | ||
align-self: center |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React, {FunctionComponent} from 'react'; | ||
|
||
export const RemoveIcon: FunctionComponent = () => ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="24" | ||
height="24" | ||
viewBox="0 0 24 24"> | ||
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" /> | ||
<path d="M0 0h24v24H0z" fill="none" /> | ||
</svg> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.removeCompare | ||
display: flex | ||
flex-direction: column | ||
|
||
.icon | ||
padding: 2px | ||
outline: 0 | ||
border: none | ||
border-radius: 50% | ||
background-color: transparent | ||
line-height: 50% | ||
cursor: pointer | ||
|
||
svg | ||
fill: #fff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React, {FunctionComponent} from 'react'; | ||
import {useDispatch} from 'react-redux'; | ||
import {useIntl} from 'react-intl'; | ||
|
||
import setSelectedLayerIdsAction from '../../actions/set-selected-layer-ids'; | ||
import {RemoveIcon} from '../icons/remove-icon'; | ||
|
||
import styles from './remove-compare.styl'; | ||
|
||
const RemoveCompare: FunctionComponent = () => { | ||
const intl = useIntl(); | ||
const dispatch = useDispatch(); | ||
|
||
const onButtonClick = () => { | ||
dispatch(setSelectedLayerIdsAction(null, false)); | ||
}; | ||
|
||
return ( | ||
<div className={styles.removeCompare}> | ||
<button | ||
className={styles.icon} | ||
title={intl.formatMessage({id: 'remove-compare'})} | ||
onClick={onButtonClick}> | ||
<RemoveIcon /> | ||
</button> | ||
</div> | ||
); | ||
}; | ||
|
||
export default RemoveCompare; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters