Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf5dc8ea

Browse files
authored
Update README.md
1 parentea8eb71 commitf5dc8ea

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

‎README.md‎

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ import * as React from 'react'
122122
import {ChangeTheme }from'../actions/layout.actions'
123123
import {Logout }from'../actions/auth.actions'
124124

125-
import {TopBar }from'../components/topBar'
126125
import {connect }from'react-redux'
127126
import {mapDispatchToProps,StateToProps }from'redux-ts'
128127

@@ -137,15 +136,28 @@ const dispatchProps = mapDispatchToProps({
137136
ChangeTheme,
138137
})
139138

140-
typeMainProps=ReturnType<typeofdispatchProps>&
141-
ReturnType<typeofstoreProps>
142-
143-
const MainContainer:React.SFC<MainProps>= ({children,...rest })=> (
144-
<div>
145-
<TopBar{...rest} />
146-
{children}
147-
</div>
148-
)
139+
typeMainProps=ReturnType<typeofdispatchProps>&ReturnType<typeofstoreProps>
140+
141+
const MainContainer:React.SFC<MainProps>= ({children,useDarkTheme,Logout,ChangeTheme })=> {
142+
143+
const appBarRightElement= (
144+
<divstyle={{ display:'inline-block' }}>
145+
<Toggle
146+
onToggle={ChangeTheme}
147+
label={useDarkTheme:'dark' :'light'}
148+
toggled={useDarkTheme}
149+
/>
150+
<FlatButtononClick={Logout}label="logout" />
151+
</div>
152+
)
153+
154+
return (
155+
<div>
156+
<AppBariconElementRight={appBarRightElement}/>
157+
{children}
158+
</div>
159+
)
160+
}
149161

150162
exportconst Main=connect(storeProps,dispatchProps)(MainContainer)
151163
```

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp