Skip to content

Commit 8c4bc22

Browse files
committed
Add a customisable colour for the Identical match block
1 parent 647151b commit 8c4bc22

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -116,22 +116,23 @@ zwd |
116116

117117
Parameters that you can use to customise some elements of this embeddable component
118118

119-
parameter | description |
120-
--------------------|-----------------------------------------------------------------------------------|
121-
h3Color | change the color of the `Similar sequences` and `Rfam classification` text |
122-
h3Size | change the size of the `Similar sequences` and `Rfam classification` text |
123-
similarSeqText | change the `Similar sequences` text |
124-
facetColor | change the color of the facet title |
125-
facetSize | change the size of the facet title |
126-
seqTitleColor | used in results, it changes the color of the title |
127-
seqTitleSize | used in results, it changes the size of the title |
128-
seqInfoColor | used in results, it changes the color of the text `number of nucleotides` |
129-
seqInfoSize | used in results, it changes the size of the text `number of nucleotides` |
130-
searchButtonColor | change the color of the `Search` button |
131-
clearButtonColor | change the color of the `Clear` button |
132-
uploadButtonColor | change the color of the `Upload file` button |
133-
hideUploadButton | hide the `Upload file` button. Use "hideUploadButton": "true" to hide the button |
134-
loadMoreButtonColor | change the color of the `Load more` button |
119+
parameter | description |
120+
----------------------------|-----------------------------------------------------------------------------------|
121+
h3Color | change the color of the `Similar sequences` and `Rfam classification` text |
122+
h3Size | change the size of the `Similar sequences` and `Rfam classification` text |
123+
exactMatchBackgroundColor | change the background color of the "Exact match" area |
124+
similarSeqText | change the `Similar sequences` text |
125+
facetColor | change the color of the facet title |
126+
facetSize | change the size of the facet title |
127+
seqTitleColor | used in results, it changes the color of the title |
128+
seqTitleSize | used in results, it changes the size of the title |
129+
seqInfoColor | used in results, it changes the color of the text `number of nucleotides` |
130+
seqInfoSize | used in results, it changes the size of the text `number of nucleotides` |
131+
searchButtonColor | change the color of the `Search` button |
132+
clearButtonColor | change the color of the `Clear` button |
133+
uploadButtonColor | change the color of the `Upload file` button |
134+
hideUploadButton | hide the `Upload file` button. Use "hideUploadButton": "true" to hide the button |
135+
loadMoreButtonColor | change the color of the `Load more` button |
135136

136137
## Developer details
137138

src/containers/SequenceSearch/components/SearchForm/index.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class SearchForm extends React.Component {
2020
const database = this.props.databases;
2121

2222
if (exactMatch && exactMatch.hitCount > 0) {
23+
const exactMatchBackgroundColor = this.props.customStyle && this.props.customStyle.exactMatchBackgroundColor ? this.props.customStyle.exactMatchBackgroundColor : "";
2324
const exactMatchDescription = exactMatch.entries[0].fields.description[0];
2425
const exactMatchId = exactMatch.entries[0].id;
2526
const exactMatchUrl = exactMatch.entries[0].fields.url[0];
@@ -29,7 +30,7 @@ class SearchForm extends React.Component {
2930

3031
return <div className="row">
3132
<div className="small-9 columns">
32-
<div className="callout success">
33+
<div className="callout success" style={{backgroundColor: exactMatchBackgroundColor}}>
3334
{
3435
database.length === 0 ? <div>
3536
<i className="icon icon-functional" data-icon="/" style={{fontSize: "80%", color: "#3c763d"}}> </i> Identical match: <a href={`https://rnacentral.org/rna/${exactMatchId}`} target='_blank'>{exactMatchDescription}</a>

0 commit comments

Comments
 (0)