From bdd847fa51c622984168c715b15d742c80348c5e Mon Sep 17 00:00:00 2001 From: Connor Boyle Date: Fri, 26 Feb 2021 17:40:50 -0800 Subject: [PATCH 1/2] Style Output Text; Default Message on Blank --- client/src/components/DeidentifiedText.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/client/src/components/DeidentifiedText.js b/client/src/components/DeidentifiedText.js index 52a4c92..ec79987 100644 --- a/client/src/components/DeidentifiedText.js +++ b/client/src/components/DeidentifiedText.js @@ -10,13 +10,23 @@ export const deidentificationStates = { export class DeidentifiedText extends React.Component { render() { let content; - if (this.props.text === deidentificationStates.EMPTY) { + let color; + let fontStyle; + if (this.props.text === deidentificationStates.EMPTY || this.props.text === "") { + fontStyle = "italic" + color = "grey"; content = "Add a clinical note on the left and click on 'Deidentify Note'"; } else if (this.props.text === deidentificationStates.LOADING) { + fontStyle = "italic" + color = "grey"; content = "Loading..." } else if (this.props.text === deidentificationStates.ERROR) { + fontStyle = "italic" + color = "grey"; content = "API call resulted in error!" } else { + fontStyle = "normal" + color = "black"; content = this.props.text; } @@ -26,10 +36,10 @@ export class DeidentifiedText extends React.Component { multiline fullWidth variant="outlined" - InputProps={{ style: {color: "black"} }} disabled rows={20} value={content} + InputProps={{ style: {color: color, fontStyle: fontStyle} }} /> ); From 1a54641ee8bf99db962ce63dca0ae09e31587206 Mon Sep 17 00:00:00 2001 From: Connor Boyle Date: Fri, 26 Feb 2021 17:49:00 -0800 Subject: [PATCH 2/2] Remove Italics --- client/src/components/DeidentifiedText.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/client/src/components/DeidentifiedText.js b/client/src/components/DeidentifiedText.js index ec79987..00422e8 100644 --- a/client/src/components/DeidentifiedText.js +++ b/client/src/components/DeidentifiedText.js @@ -11,21 +11,16 @@ export class DeidentifiedText extends React.Component { render() { let content; let color; - let fontStyle; if (this.props.text === deidentificationStates.EMPTY || this.props.text === "") { - fontStyle = "italic" color = "grey"; content = "Add a clinical note on the left and click on 'Deidentify Note'"; } else if (this.props.text === deidentificationStates.LOADING) { - fontStyle = "italic" color = "grey"; content = "Loading..." } else if (this.props.text === deidentificationStates.ERROR) { - fontStyle = "italic" color = "grey"; content = "API call resulted in error!" } else { - fontStyle = "normal" color = "black"; content = this.props.text; } @@ -39,7 +34,7 @@ export class DeidentifiedText extends React.Component { disabled rows={20} value={content} - InputProps={{ style: {color: color, fontStyle: fontStyle} }} + InputProps={{ style: {color: color} }} /> );