Merge pull request #37 from transitive-bullshit/feature/typescript-support-v2
add typescript support v2
This commit is contained in:
parent
faba0e5f9e
commit
c0769c2743
45 changed files with 2544 additions and 6662 deletions
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"env": {
|
||||
"jest": true
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
import styles from './styles.css'
|
||||
|
||||
export default class ExampleComponent extends Component {
|
||||
static propTypes = {
|
||||
text: PropTypes.string
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
text
|
||||
} = this.props
|
||||
|
||||
return (
|
||||
<div className={styles.test}>
|
||||
Example Component: {text}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
/* add css styles here (optional) */
|
||||
|
||||
.test {
|
||||
display: inline-block;
|
||||
margin: 2em auto;
|
||||
border: 2px solid #000;
|
||||
font-size: 2em;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
import ExampleComponent from './'
|
||||
|
||||
describe('ExampleComponent', () => {
|
||||
it('is truthy', () => {
|
||||
expect(ExampleComponent).toBeTruthy()
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue