File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
src/components/BrowserView Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ const BrowserView = () => {
1515 checkedMouse : false ,
1616 muted : false ,
1717 checkedGrayscale : false ,
18+ checkedContrast : false ,
1819 } ) ;
1920
2021 // Mute/Unmute webview
@@ -72,6 +73,14 @@ const BrowserView = () => {
7273 } ) ;
7374 break ;
7475
76+ // Updates contrast
77+ case 'checkedContrast' :
78+ setCheckBox ( {
79+ ...checkedBoxes ,
80+ checkedContrast : ! checkedBoxes . checkedContrast ,
81+ } ) ;
82+ break ;
83+
7584 default :
7685 break ;
7786 }
@@ -130,6 +139,18 @@ const BrowserView = () => {
130139 ) }
131140 label = "Grayscale"
132141 />
142+ < FormControlLabel
143+ id = "contrastCheckbox"
144+ control = { (
145+ < Checkbox
146+ value = "contrast"
147+ checked = { checkedBoxes . checkedContrast }
148+ onChange = { handleChangeCheckBox }
149+ name = "checkedContrast"
150+ />
151+ ) }
152+ label = "Low Contrast"
153+ />
133154 < FormControlLabel
134155 id = "Mute Audio Checkbox"
135156 control = { (
@@ -155,7 +176,9 @@ const BrowserView = () => {
155176 id = { styles . browserView }
156177 src = { url }
157178 style = { {
158- filter : checkedBoxes . checkedGrayscale ? 'grayscale(100%)' : 'grayscale(0%)' ,
179+ // filter: checkedBoxes.checkedGrayscale ? 'grayscale(100%)' : 'grayscale(0%)',
180+ filter : checkedBoxes . checkedGrayscale && checkedBoxes . checkedContrast ? 'grayscale(100%) contrast(0.2)'
181+ : checkedBoxes . checkedGrayscale ? 'grayscale(100%)' : checkedBoxes . checkedContrast ?'contrast(0.2)' : null ,
159182 pointerEvents : checkedBoxes . checkedMouse ? 'none' : 'auto' ,
160183 } }
161184 />
You can’t perform that action at this time.
0 commit comments