-
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.
Merge pull request #176 from Vizzuality/feature/world-map-improvements
Feature/world map improvements vol1
- Loading branch information
Showing
16 changed files
with
308 additions
and
74 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,96 @@ | ||
@import "variables"; | ||
|
||
$button-border-width: 4px; | ||
|
||
.link { | ||
color: $red; | ||
padding: 3px; | ||
|
||
&:hover { | ||
color: $red-medium; | ||
text-decoration: underline; | ||
} | ||
|
||
&:focus { | ||
color: white; | ||
background-color: $red-medium; | ||
text-decoration: underline; | ||
} | ||
} | ||
|
||
.button { | ||
$button-height: 40px; | ||
height: $button-height; | ||
font-family: $family-sans-serif-bold; | ||
cursor: pointer; | ||
|
||
&.is-primary { | ||
justify-content: center; | ||
align-items: center; | ||
height: $button-height; | ||
|
||
color: white; | ||
|
||
background-color: $red; | ||
|
||
&.is-small { | ||
border-radius: 0; | ||
height: 30px; | ||
min-width: 100px; | ||
} | ||
|
||
&.is-hovered, | ||
&:hover { | ||
background-color: $red-dark; | ||
} | ||
|
||
&.is-focused, | ||
&:focus { | ||
background-color: $red-dark; | ||
height: $button-height; | ||
text-decoration: underline; | ||
} | ||
|
||
&.with-border { | ||
border: 2px solid $grey; | ||
height: $button-height; | ||
|
||
&.is-hovered, | ||
&:hover { | ||
border: 2px solid $white; | ||
} | ||
} | ||
} | ||
|
||
&.is-secondary { | ||
border: 2px solid $red; | ||
color: $red; | ||
justify-content: center; | ||
align-items: center; | ||
|
||
&.is-small { | ||
border-radius: 0; | ||
height: 30px; | ||
min-width: 100px; | ||
} | ||
|
||
&.is-hovered, | ||
&:hover, | ||
&.is-focused, | ||
&:focus { | ||
color: $red-medium; | ||
} | ||
|
||
&.is-focused, | ||
&:focus { | ||
text-decoration: underline; | ||
} | ||
} | ||
|
||
&.with-icon { | ||
img { | ||
margin-right: 10px; | ||
vertical-align: middle; | ||
} | ||
} | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React from 'react'; | ||
import Select, {components} from 'react-select'; | ||
|
||
const Option = props => ( | ||
<div> | ||
<components.Option {...props}> | ||
<input type="checkbox" hidden checked={props.isSelected} onChange={() => null} /> | ||
{props.isSelected && <div className="checked select-checkbox"><i className="fa fa-check" /></div>} | ||
{!props.isSelected && <div className="unchecked select-checkbox" />} | ||
<label>{props.label}</label> | ||
</components.Option> | ||
</div> | ||
); | ||
|
||
const ValueContainer = ({children, ...props}) => { | ||
const controls = React.Children.toArray(children).filter(item => ['Input', 'Placeholder'].includes(item.type.name)); | ||
return ( | ||
<components.ValueContainer {...props}> | ||
{(props.selectProps.value || []).length !== 0 && <span>{props.selectProps.value.length} selected</span>} | ||
{controls} | ||
</components.ValueContainer> | ||
); | ||
}; | ||
|
||
const MultiSelect = (props) => ( | ||
<Select | ||
components={{ Option, ValueContainer }} | ||
isMulti | ||
{...props} | ||
/> | ||
); | ||
|
||
export default MultiSelect; |
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
Oops, something went wrong.