Skip to content

Commit 04cda15

Browse files
author
Connor Boyle
authored
Merge pull request #36 from cascadianblue/35-output-text
Style Output Text; Default Message on Blank
2 parents ad292fd + 1a54641 commit 04cda15

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

client/src/components/DeidentifiedText.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,18 @@ export const deidentificationStates = {
1010
export class DeidentifiedText extends React.Component {
1111
render() {
1212
let content;
13-
if (this.props.text === deidentificationStates.EMPTY) {
13+
let color;
14+
if (this.props.text === deidentificationStates.EMPTY || this.props.text === "") {
15+
color = "grey";
1416
content = "Add a clinical note on the left and click on 'Deidentify Note'";
1517
} else if (this.props.text === deidentificationStates.LOADING) {
18+
color = "grey";
1619
content = "Loading..."
1720
} else if (this.props.text === deidentificationStates.ERROR) {
21+
color = "grey";
1822
content = "API call resulted in error!"
1923
} else {
24+
color = "black";
2025
content = this.props.text;
2126
}
2227

@@ -26,10 +31,10 @@ export class DeidentifiedText extends React.Component {
2631
multiline
2732
fullWidth
2833
variant="outlined"
29-
InputProps={{ style: {color: "black"} }}
3034
disabled
3135
rows={20}
3236
value={content}
37+
InputProps={{ style: {color: color} }}
3338
/>
3439
</Paper>
3540
);

0 commit comments

Comments
 (0)