-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9e8dcb0
commit 5640bfa
Showing
5 changed files
with
57 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import * as React from 'react' | ||
import { Layout, Space, Switch } from '../auto-ui' | ||
|
||
class Demo extends React.PureComponent { | ||
state = { active: true } | ||
|
||
render() { | ||
return ( | ||
<Layout supportDarkMode={!!localStorage.getItem('darkMode')}> | ||
<Layout.Body> | ||
<Switch active={this.state.active} minimum onChange={this.onChange} /> | ||
<Space size={2} /> | ||
<Switch active={!this.state.active} minimum onChange={this.onChange} /> | ||
</Layout.Body> | ||
</Layout> | ||
) | ||
} | ||
|
||
private onChange = () => { | ||
this.setState({ active: !this.state.active }) | ||
} | ||
} | ||
|
||
export default Demo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters