@@ -33,6 +33,7 @@ import {
3333} from 'react'
3434
3535import { Alert } from '@instructure/ui-alerts'
36+ import { Checkbox } from '@instructure/ui-checkbox'
3637import { InstUISettingsProvider , withStyle , jsx } from '@instructure/emotion'
3738import { Flex } from '@instructure/ui-flex'
3839import { Text } from '@instructure/ui-text'
@@ -55,7 +56,6 @@ import {
5556 IconUserLine ,
5657 IconXSolid
5758} from '@instructure/ui-icons'
58-
5959import { ContentWrap } from '../ContentWrap'
6060import { Document } from '../Document'
6161import { Header } from '../Header'
@@ -69,7 +69,6 @@ import { Icons } from '../Icons'
6969import { compileMarkdown } from '../compileMarkdown'
7070
7171import { fetchVersionData , versionInPath } from '../versionData'
72-
7372import generateStyle from './styles'
7473import generateComponentTheme from './theme'
7574import { LoadingScreen } from '../LoadingScreen'
@@ -126,7 +125,8 @@ class App extends Component<AppProps, AppState> {
126125 layout : 'large' ,
127126 docsData : null ,
128127 versionsData : null ,
129- iconsData : null
128+ iconsData : null ,
129+ lightMode : true
130130 }
131131 }
132132
@@ -734,7 +734,6 @@ class App extends Component<AppProps, AppState> {
734734 return < LoadingScreen />
735735 }
736736
737- const lightMode = false
738737 const brandSvg = (
739738 < IconButton
740739 screenReaderLabel = "Canvas Brand"
@@ -770,27 +769,27 @@ class App extends Component<AppProps, AppState> {
770769 boxSizing : 'border-box'
771770 } }
772771 >
773- < MobileTopNav brand = { brandSvg } lightMode = { lightMode } >
772+ < MobileTopNav brand = { brandSvg } lightMode = { this . state . lightMode } >
774773 < MobileTopNav . BtnRow >
775774 < IconButton
776775 withBackground = { false }
777776 withBorder = { false }
778777 screenReaderLabel = "burgir"
779- color = { lightMode ? 'secondary' : 'primary-inverse' }
778+ color = { this . state . lightMode ? 'secondary' : 'primary-inverse' }
780779 >
781780 < IconAnalyticsLine />
782781 </ IconButton >
783782 < IconButton
784783 withBackground = { false }
785784 withBorder = { false }
786785 screenReaderLabel = "burgir"
787- color = { lightMode ? 'secondary' : 'primary-inverse' }
786+ color = { this . state . lightMode ? 'secondary' : 'primary-inverse' }
788787 >
789788 < IconAlertsLine />
790789 </ IconButton >
791790 </ MobileTopNav . BtnRow >
792791 < MobileTopNav . BreadCrumb >
793- < Link href = "#" isWithinText = { false } color = " link-inverse" >
792+ < Link href = "#" isWithinText = { false } color = { this . state . lightMode ? ' link' : 'link -inverse' } >
794793 < div
795794 style = { { display : 'flex' , alignItems : 'center' , gap : '8px' } }
796795 >
@@ -822,8 +821,28 @@ class App extends Component<AppProps, AppState> {
822821 >
823822 Dashboard
824823 </ MobileTopNav . Item >
824+ < MobileTopNav . Item
825+ rightIcon = { < IconArrowOpenDownLine /> }
826+ onClick = { ( ) => alert ( 'Simple option with no left icon' ) }
827+ >
828+ Simple option with no left icon
829+ </ MobileTopNav . Item >
825830 </ MobileTopNav . ItemList >
826831 </ MobileTopNav >
832+ < div style = { { marginTop : '600px' } } >
833+ < Checkbox
834+ label = "Light mode"
835+ value = "small"
836+ variant = "toggle"
837+ size = "large"
838+ checked = { this . state . lightMode }
839+ onChange = { ( e ) => {
840+ this . setState ( ( prevState ) => {
841+ return { ...prevState , lightMode : ! prevState . lightMode }
842+ } )
843+ } }
844+ />
845+ </ div >
827846 < p >
828847 1 Lorem ipsum dolor sit, amet consectetur adipisicing elit.
829848 Molestias excepturi a blanditiis, aspernatur repellat repellendus
0 commit comments