@@ -38,10 +38,10 @@ const SectionHeader = styled.h2`
38
38
39
39
const MobilePreferences = ( props ) => {
40
40
const {
41
- setTheme, setAutosave, setLinewrap, setTextOutput, setGridOutput, setSoundOutput
41
+ setTheme, setAutosave, setLinewrap, setTextOutput, setGridOutput, setSoundOutput, lineNumbers , lintWarning
42
42
} = props ;
43
43
const {
44
- theme, autosave, linewrap, textOutput, gridOutput, soundOutput
44
+ theme, autosave, linewrap, textOutput, gridOutput, soundOutput, setLineNumbers , setLintWarning
45
45
} = props ;
46
46
47
47
const generalSettings = [
@@ -91,7 +91,7 @@ const MobilePreferences = (props) => {
91
91
}
92
92
] ;
93
93
94
- const accessibilitySettings = [
94
+ const outputSettings = [
95
95
{
96
96
title : 'Plain-text' ,
97
97
value : textOutput ,
@@ -133,6 +133,35 @@ const MobilePreferences = (props) => {
133
133
} ,
134
134
] ;
135
135
136
+ const accessibilitySettings = [
137
+ {
138
+ title : 'Line Numbers' ,
139
+ value : lineNumbers ,
140
+ options : [
141
+ {
142
+ value : true , label : 'On' , ariaLabel : 'line numbers on' , name : 'line numbers' , id : 'line-numbers-on'
143
+ } ,
144
+ {
145
+ value : false , label : 'Off' , ariaLabel : 'line numbers off' , name : 'line numbers' , id : 'line-numbers-off'
146
+ } ,
147
+ ] ,
148
+ onSelect : x => setLineNumbers ( x )
149
+ } ,
150
+ {
151
+ title : 'Lint Warning Sound' ,
152
+ value : lintWarning ,
153
+ options : [
154
+ {
155
+ value : true , label : 'On' , ariaLabel : 'lint warning on' , name : 'lint warning' , id : 'lint-warning-on'
156
+ } ,
157
+ {
158
+ value : false , label : 'Off' , ariaLabel : 'lint warning off' , name : 'lint warning' , id : 'lint-warning-off'
159
+ } ,
160
+ ] ,
161
+ onSelect : x => setLintWarning ( x )
162
+ } ,
163
+ ] ;
164
+
136
165
// useEffect(() => { });
137
166
138
167
return (
@@ -156,12 +185,17 @@ const MobilePreferences = (props) => {
156
185
< SectionHeader > Accessibility</ SectionHeader >
157
186
{ accessibilitySettings . map ( option => < Selector key = { `${ option . title } wrapper` } { ...option } /> ) }
158
187
188
+ < SectionHeader > Accessible Output</ SectionHeader >
189
+ < h3 > Used with screen reader</ h3 >
190
+ { outputSettings . map ( option => < Selector key = { `${ option . title } wrapper` } { ...option } /> ) }
191
+
159
192
</ Content >
160
193
</ section >
161
194
</ section >
162
195
</ Screen > ) ;
163
196
} ;
164
197
198
+
165
199
MobilePreferences . propTypes = {
166
200
fontSize : PropTypes . number . isRequired ,
167
201
lineNumbers : PropTypes . bool . isRequired ,
0 commit comments