mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-18 08:16:07 +00:00
clean package.json and repair code style (#2411)
* clean package.json and repair code style * update css style * repair bug
This commit is contained in:
committed by
Daniel Pan
parent
3ab4cbff4f
commit
3a67d78016
@@ -1,4 +1,10 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
const propTypes = {
|
||||
item: PropTypes.object.isRequired,
|
||||
onItemClickHandler: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
class SearchResultItem extends React.Component {
|
||||
|
||||
@@ -11,12 +17,14 @@ class SearchResultItem extends React.Component {
|
||||
let item = this.props.item;
|
||||
return (
|
||||
<li className="search-result-item" onClick={this.onClickHandler}>
|
||||
<span className="item-content item-name">{item.name}</span>
|
||||
<span className="item-content item-link">{item.link_content}</span>
|
||||
<div className="item-content item-text" dangerouslySetInnerHTML={{__html: item.content}}></div>
|
||||
<span className="item-content item-name">{item.name}</span>
|
||||
<span className="item-content item-link">{item.link_content}</span>
|
||||
<div className="item-content item-text" dangerouslySetInnerHTML={{__html: item.content}}></div>
|
||||
</li>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
SearchResultItem.propTypes = propTypes;
|
||||
|
||||
export default SearchResultItem;
|
||||
|
Reference in New Issue
Block a user