File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
src/containers/SequenceSearch/components/SearchForm Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,7 @@ seqInfoSize | used in results, it changes the size of the text `number o
130130searchButtonColor | change the color of the ` Search ` button |
131131clearButtonColor | change the color of the ` Clear ` button |
132132uploadButtonColor | change the color of the ` Upload file ` button |
133+ hideUploadButton | hide the ` Upload file ` button. Use "hideUploadButton": "true" to hide the button |
133134loadMoreButtonColor | change the color of the ` Load more ` button |
134135
135136## Developer details
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ class SearchForm extends React.Component {
6868 const searchButtonColor = this . props . customStyle && this . props . customStyle . searchButtonColor ? this . props . customStyle . searchButtonColor : "" ;
6969 const clearButtonColor = this . props . customStyle && this . props . customStyle . clearButtonColor ? this . props . customStyle . clearButtonColor : "#6c757d" ;
7070 const uploadButtonColor = this . props . customStyle && this . props . customStyle . uploadButtonColor ? this . props . customStyle . uploadButtonColor : "" ;
71- const database = this . props . databases ? this . props . databases . map ( function ( x ) { return x . toUpperCase ( ) } ) : [ ] ;
71+ const hideUploadButton = this . props . customStyle && this . props . customStyle . hideUploadButton ? "none" : "initial" ;
7272 return (
7373 < div >
7474 < div className = "row" >
@@ -90,15 +90,13 @@ class SearchForm extends React.Component {
9090 < div className = "row" >
9191 < input id = "clear-button" style = { { background : clearButtonColor } } name = "clear" type = "submit" value = "Clear" className = "button" onClick = { this . props . onClearSequence } disabled = { ! this . props . sequence ? "disabled" : "" } />
9292 </ div >
93- {
94- database . indexOf ( "RFAM" ) === - 1 && < div >
95- < div className = "row" >
96- < label htmlFor = "file-upload" className = "custom-file-upload" style = { { background : uploadButtonColor } } > Upload file</ label >
97- < input id = "file-upload" type = "file" accept = ".fasta" onClick = { this . props . onClearSequence } onChange = { this . props . onFileUpload } />
98- </ div >
99- < div className = "row" > < small > Up to 50 queries</ small > </ div >
93+ < div style = { { display : hideUploadButton } } >
94+ < div className = "row" >
95+ < label htmlFor = "file-upload" className = "custom-file-upload" style = { { background : uploadButtonColor } } > Upload file</ label >
96+ < input id = "file-upload" type = "file" accept = ".fasta" onClick = { this . props . onClearSequence } onChange = { this . props . onFileUpload } />
10097 </ div >
101- }
98+ < div className = "row" > < small > Up to 50 queries</ small > </ div >
99+ </ div >
102100 </ div >
103101 </ div >
104102 < div className = "row" >
You can’t perform that action at this time.
0 commit comments