mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-17 02:29:10 +00:00
sync, too many changes to list out
This commit is contained in:
parent
3ba5bdb999
commit
6413d7c642
14 changed files with 469 additions and 32 deletions
25
ui/components/role/demo.js
Normal file
25
ui/components/role/demo.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
// @flow
|
||||
import * as React from 'react'
|
||||
import Role, { type RoleData } from './index'
|
||||
|
||||
export type DemoRoleProps = {
|
||||
role: RoleData
|
||||
}
|
||||
|
||||
type DemoRoleState = {
|
||||
active: boolean
|
||||
}
|
||||
|
||||
export default class RoleDemo extends React.Component<DemoRoleProps, DemoRoleState> {
|
||||
state = {
|
||||
active: false
|
||||
}
|
||||
|
||||
onToggle = (n: boolean) => {
|
||||
this.setState({ active: n })
|
||||
}
|
||||
|
||||
render () {
|
||||
return <Role role={this.props.role} onToggle={this.onToggle} active={this.state.active} />
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue