We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 909b168 commit 8d60e45Copy full SHA for 8d60e45
src/index.jsx
@@ -8,6 +8,14 @@ const store ={
8
};
9
10
export default class extends React.Component {
11
+ static propTypes = {
12
+ onChange: React.PropTypes.func,
13
+ tag: React.PropTypes.string
14
+ };
15
+ static defaultProps = {
16
+ tag: 'div'
17
18
+
19
sortable = null;
20
21
componentDidMount() {
@@ -57,8 +65,7 @@ export default class extends React.Component {
57
65
this.sortable = Sortable.create(ReactDOM.findDOMNode(this), options);
58
66
}
59
67
render() {
60
- return (
61
- <div className={this.props.className}>{this.props.children}</div>
62
- );
68
+ const { children, className, tag } = this.props;
69
+ return React.DOM[tag]({ className }, children);
63
70
64
71
0 commit comments