@@ -37,8 +37,12 @@ const SectionHeader = styled.h2`
37
37
38
38
39
39
const MobilePreferences = ( props ) => {
40
- const { setTheme, setAutosave, setLinewrap } = props ;
41
- const { theme, autosave, linewrap } = props ;
40
+ const {
41
+ setTheme, setAutosave, setLinewrap, setTextOutput, setGridOutput, setSoundOutput
42
+ } = props ;
43
+ const {
44
+ theme, autosave, linewrap, textOutput, gridOutput, soundOutput
45
+ } = props ;
42
46
43
47
const generalSettings = [
44
48
{
@@ -87,6 +91,48 @@ const MobilePreferences = (props) => {
87
91
}
88
92
] ;
89
93
94
+ const accessibilitySettings = [
95
+ {
96
+ title : 'Plain-text' ,
97
+ value : textOutput ,
98
+ options : [
99
+ {
100
+ value : true , label : 'On' , ariaLabel : 'text output on' , name : 'text output' , id : 'text-output-on'
101
+ } ,
102
+ {
103
+ value : false , label : 'Off' , ariaLabel : 'text output off' , name : 'text output' , id : 'text-output-off'
104
+ } ,
105
+ ] ,
106
+ onSelect : x => setTextOutput ( x )
107
+ } ,
108
+ {
109
+ title : 'Table-text' ,
110
+ value : gridOutput ,
111
+ options : [
112
+ {
113
+ value : true , label : 'On' , ariaLabel : 'table output on' , name : 'table output' , id : 'table-output-on'
114
+ } ,
115
+ {
116
+ value : false , label : 'Off' , ariaLabel : 'table output off' , name : 'table output' , id : 'table-output-off'
117
+ } ,
118
+ ] ,
119
+ onSelect : x => setGridOutput ( x )
120
+ } ,
121
+ {
122
+ title : 'Sound' ,
123
+ value : soundOutput ,
124
+ options : [
125
+ {
126
+ value : true , label : 'On' , ariaLabel : 'sound output on' , name : 'sound output' , id : 'sound-output-on'
127
+ } ,
128
+ {
129
+ value : false , label : 'Off' , ariaLabel : 'sound output off' , name : 'sound output' , id : 'sound-output-off'
130
+ } ,
131
+ ] ,
132
+ onSelect : x => setSoundOutput ( x )
133
+ } ,
134
+ ] ;
135
+
90
136
// useEffect(() => { });
91
137
92
138
return (
@@ -108,13 +154,14 @@ const MobilePreferences = (props) => {
108
154
{ generalSettings . map ( option => < Selector key = { `${ option . title } wrapper` } { ...option } /> ) }
109
155
110
156
< SectionHeader > Accessibility</ SectionHeader >
157
+ { accessibilitySettings . map ( option => < Selector key = { `${ option . title } wrapper` } { ...option } /> ) }
158
+
111
159
</ Content >
112
160
</ section >
113
161
</ section >
114
162
</ Screen > ) ;
115
163
} ;
116
164
117
-
118
165
MobilePreferences . propTypes = {
119
166
fontSize : PropTypes . number . isRequired ,
120
167
lineNumbers : PropTypes . bool . isRequired ,
0 commit comments