forked from fanruan/fineui
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
464 B
19 lines
464 B
import {shortcut} from "../src/h"; |
|
import {Component} from "../src/component"; |
|
|
|
class Label extends Component { |
|
constructor(props, context) { |
|
super(props, context); |
|
this.state = {count: 0} |
|
this._onClick = () => { |
|
this.setState({ |
|
count: ++this.state.count |
|
}) |
|
}; |
|
} |
|
|
|
render() { |
|
return <div onClick={this._onClick}>{this.state.count}</div>; |
|
} |
|
} |
|
shortcut("bi-label", Label) |