-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Evaluation improvements part 1(#219)
- Loading branch information
1 parent
b7b53b1
commit bcf2ee8
Showing
13 changed files
with
493 additions
and
196 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,64 @@ | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
|
||
import { Icon } from 'semantic-ui-react' | ||
|
||
const propTypes = { | ||
children: PropTypes.element.isRequired, | ||
color: PropTypes.string, | ||
marker: PropTypes.string, | ||
} | ||
|
||
const defaultProps = { | ||
color: undefined, | ||
marker: undefined, | ||
} | ||
|
||
const EvaluationListItem = ({ color, children, marker }) => ( | ||
<div className="evaluationListItem"> | ||
{color && ( | ||
<div className="colorSquare"> | ||
<Icon name="square icon" /> | ||
</div> | ||
)} | ||
<div className="content">{children}</div> | ||
{marker && <div className="marker">{marker}</div>} | ||
|
||
<style jsx>{` | ||
.evaluationListItem { | ||
display: flex; | ||
flex-flow: row wrap; | ||
align-items: center; | ||
padding: 0.1rem 0; | ||
border-bottom: 1px solid lightgrey; | ||
&:first-child { | ||
border-top: 1px solid lightgrey; | ||
} | ||
.colorSquare :global(i) { | ||
flex: 0 0 auto; | ||
color: ${color}; | ||
} | ||
.marker { | ||
flex: 0 0 auto; | ||
font-weight: bold; | ||
} | ||
.content { | ||
flex: 1; | ||
} | ||
} | ||
`}</style> | ||
</div> | ||
) | ||
|
||
EvaluationListItem.propTypes = propTypes | ||
EvaluationListItem.defaultProps = defaultProps | ||
|
||
export default EvaluationListItem |
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
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.