You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
559 B
JavaScript
15 lines
559 B
JavaScript
import React, { Component } from 'react'
|
|
import classes from './HighlightedSpan.scss'
|
|
|
|
const HighlightedSpan = ({children, isHighlighted, isClickable = false, ...otherProps}) => {
|
|
const classNames = `${isHighlighted ? classes.highlighted : '' } ${isClickable ? classes.clickable : ''}`
|
|
return <span className={classNames} {...otherProps}>{children}</span>
|
|
}
|
|
|
|
HighlightedSpan.propTypes = {
|
|
children: React.PropTypes.any,
|
|
isHighlighted: React.PropTypes.bool.isRequired,
|
|
isClickable: React.PropTypes.bool
|
|
}
|
|
|
|
export default HighlightedSpan |