File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 2424 work correctly both with client-side routing and a non-root public URL.
2525 Learn how to configure a non-root public URL by running `npm run build`.
2626 -->
27- < title > Task.json WebUI </ title >
27+ < title > Task.json Web </ title >
2828 </ head >
2929 < body >
3030 < noscript > You need to enable JavaScript to run this app.</ noscript >
Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ import {
1212 fade ,
1313 CssBaseline ,
1414 createMuiTheme ,
15- ThemeProvider
15+ ThemeProvider ,
16+ useMediaQuery
1617} from '@material-ui/core' ;
1718import {
1819 ToggleButton ,
@@ -76,6 +77,8 @@ function App() {
7677 const [ taskType , setTaskType ] = useState < TaskType > ( "todo" ) ;
7778 const [ currentTask , setCurrentTask ] = useState < Task | null > ( null ) ;
7879
80+ const isSmallDevice = useMediaQuery ( theme . breakpoints . down ( "xs" ) ) ;
81+
7982 const handleTaskType = ( _event : React . MouseEvent < HTMLElement > , newType : TaskType | null ) => {
8083 if ( newType )
8184 setTaskType ( newType ) ;
@@ -109,15 +112,15 @@ function App() {
109112 >
110113 < ToggleButton value = "todo" className = { classes . toggleButton } >
111114 < ScheduleIcon className = { classes . icon } />
112- todo
115+ { isSmallDevice || " todo" }
113116 </ ToggleButton >
114117 < ToggleButton value = "done" className = { classes . toggleButton } >
115118 < CheckIcon className = { classes . icon } />
116- done
119+ { isSmallDevice || " done" }
117120 </ ToggleButton >
118121 < ToggleButton value = "removed" className = { classes . toggleButton } >
119122 < DeleteIcon className = { classes . icon } />
120- removed
123+ { isSmallDevice || " removed" }
121124 </ ToggleButton >
122125 </ ToggleButtonGroup >
123126
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ function Layout(props: Props) {
7676 < Toolbar >
7777 < StickerCheckOutlineIcon className = { classes . icon } />
7878 < Typography variant = "h6" noWrap className = { classes . title } >
79- Task.json WebUI
79+ Task.json Web
8080 </ Typography >
8181
8282 < IconButton
You can’t perform that action at this time.
0 commit comments