Skip to content

Commit

Permalink
Merge pull request #36 from cascadianblue/35-output-text
Browse files Browse the repository at this point in the history
Style Output Text; Default Message on Blank
  • Loading branch information
Connor Boyle authored Feb 27, 2021
2 parents ad292fd + 1a54641 commit 04cda15
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions client/src/components/DeidentifiedText.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ export const deidentificationStates = {
export class DeidentifiedText extends React.Component {
render() {
let content;
if (this.props.text === deidentificationStates.EMPTY) {
let color;
if (this.props.text === deidentificationStates.EMPTY || this.props.text === "") {
color = "grey";
content = "Add a clinical note on the left and click on 'Deidentify Note'";
} else if (this.props.text === deidentificationStates.LOADING) {
color = "grey";
content = "Loading..."
} else if (this.props.text === deidentificationStates.ERROR) {
color = "grey";
content = "API call resulted in error!"
} else {
color = "black";
content = this.props.text;
}

Expand All @@ -26,10 +31,10 @@ export class DeidentifiedText extends React.Component {
multiline
fullWidth
variant="outlined"
InputProps={{ style: {color: "black"} }}
disabled
rows={20}
value={content}
InputProps={{ style: {color: color} }}
/>
</Paper>
);
Expand Down

0 comments on commit 04cda15

Please sign in to comment.