@@ -37,8 +37,12 @@ const SectionHeader = styled.h2`
3737
3838
3939const 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 ;
4246
4347 const generalSettings = [
4448 {
@@ -87,6 +91,48 @@ const MobilePreferences = (props) => {
8791 }
8892 ] ;
8993
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+
90136 // useEffect(() => { });
91137
92138 return (
@@ -108,13 +154,14 @@ const MobilePreferences = (props) => {
108154 { generalSettings . map ( option => < Selector key = { `${ option . title } wrapper` } { ...option } /> ) }
109155
110156 < SectionHeader > Accessibility</ SectionHeader >
157+ { accessibilitySettings . map ( option => < Selector key = { `${ option . title } wrapper` } { ...option } /> ) }
158+
111159 </ Content >
112160 </ section >
113161 </ section >
114162 </ Screen > ) ;
115163} ;
116164
117-
118165MobilePreferences . propTypes = {
119166 fontSize : PropTypes . number . isRequired ,
120167 lineNumbers : PropTypes . bool . isRequired ,
0 commit comments