-
Notifications
You must be signed in to change notification settings - Fork 1
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 #9 from srt4rulez/develop
v0.2.0
- Loading branch information
Showing
24 changed files
with
325 additions
and
75 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
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,63 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import classNames from 'classnames'; | ||
import './MarkerListItem.scss'; | ||
|
||
const propTypes = { | ||
tag: PropTypes.string, | ||
className: PropTypes.string, | ||
isFound: PropTypes.bool, | ||
onMarkCheckboxChange: PropTypes.func, | ||
onMarkerTitleClick: PropTypes.func, | ||
title: PropTypes.string, | ||
}; | ||
|
||
const defaultProps = { | ||
tag: 'li', | ||
className: '', | ||
isFound: false, | ||
onMarkCheckboxChange: (event) => {}, | ||
onMarkerTitleClick: (event) => {}, | ||
title: '', | ||
}; | ||
|
||
const MarkerListItem = (props) => { | ||
|
||
const Tag = props.tag; | ||
|
||
return ( | ||
|
||
<Tag | ||
className={classNames([ | ||
'marker-list-item', | ||
props.className, | ||
])} | ||
> | ||
|
||
<input | ||
className={classNames('marker-list-item__found-checkbox')} | ||
type="checkbox" | ||
checked={props.isFound} | ||
onChange={props.onMarkCheckboxChange} | ||
title="Mark As Found" | ||
/> | ||
|
||
<button | ||
className={classNames('marker-list-item__button')} | ||
onClick={props.onMarkerTitleClick} | ||
> | ||
|
||
{props.title} | ||
|
||
</button> | ||
|
||
</Tag> | ||
|
||
); | ||
|
||
}; | ||
|
||
MarkerListItem.propTypes = propTypes; | ||
MarkerListItem.defaultProps = defaultProps; | ||
|
||
export default MarkerListItem; |
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,34 @@ | ||
@import '~bulma/sass/utilities/_all.sass'; | ||
|
||
%button-reset { | ||
// Reset button styles to look more like a link. | ||
background-color: transparent; | ||
border: none; | ||
cursor: pointer; | ||
text-decoration: none; | ||
display: inline; | ||
margin: 0; | ||
padding: 0; | ||
color: $link; | ||
font-size: 1rem; | ||
text-align: left; | ||
|
||
&:hover, | ||
&:focus { | ||
color: $link-hover; | ||
} | ||
} | ||
|
||
.marker-list-item { | ||
display: flex; | ||
align-items: center; | ||
margin-bottom: 0.25rem; | ||
|
||
&__found-checkbox { | ||
margin-right: 0.5rem; | ||
} | ||
|
||
&__button { | ||
@extend %button-reset; | ||
} | ||
} |
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
Oops, something went wrong.