mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-01-12 22:51:09 +08:00
Add placeholder ListView and ScrollView
This commit is contained in:
20
src/components/ListView/index.js
Normal file
20
src/components/ListView/index.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import React, { PropTypes } from 'react'
|
||||
import ScrollView from '../ScrollView'
|
||||
|
||||
class ListView extends React.Component {
|
||||
static propTypes = {
|
||||
children: PropTypes.any
|
||||
}
|
||||
|
||||
static defaultProps = {
|
||||
className: ''
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<ScrollView {...this.props} />
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default ListView
|
||||
18
src/components/ListView/index.spec.js
Normal file
18
src/components/ListView/index.spec.js
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
import assert from 'assert'
|
||||
import React from 'react/addons'
|
||||
|
||||
import ListView from '.'
|
||||
|
||||
const ReactTestUtils = React.addons.TestUtils
|
||||
|
||||
function shallowRender(component, context = {}) {
|
||||
const shallowRenderer = React.addons.TestUtils.createRenderer()
|
||||
shallowRenderer.render(component, context)
|
||||
return shallowRenderer.getRenderOutput()
|
||||
}
|
||||
|
||||
suite.skip('ListView', () => {
|
||||
test('prop "children"', () => {})
|
||||
})
|
||||
*/
|
||||
20
src/components/ScrollView/index.js
Normal file
20
src/components/ScrollView/index.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import React, { PropTypes } from 'react'
|
||||
import View from '../View'
|
||||
|
||||
class ScrollView extends React.Component {
|
||||
static propTypes = {
|
||||
children: PropTypes.any
|
||||
}
|
||||
|
||||
static defaultProps = {
|
||||
className: ''
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<View {...this.props} />
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default ScrollView
|
||||
18
src/components/ScrollView/index.spec.js
Normal file
18
src/components/ScrollView/index.spec.js
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
import assert from 'assert'
|
||||
import React from 'react/addons'
|
||||
|
||||
import ScrollView from '.'
|
||||
|
||||
const ReactTestUtils = React.addons.TestUtils
|
||||
|
||||
function shallowRender(component, context = {}) {
|
||||
const shallowRenderer = React.addons.TestUtils.createRenderer()
|
||||
shallowRenderer.render(component, context)
|
||||
return shallowRenderer.getRenderOutput()
|
||||
}
|
||||
|
||||
suite.skip('ScrollView', () => {
|
||||
test('prop "children"', () => {})
|
||||
})
|
||||
*/
|
||||
Reference in New Issue
Block a user