mirror of
https://github.com/bendtherules/ts-transformer-visualizer.git
synced 2026-08-18 13:51:48 +00:00
init create-react-library@2.6.7
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @class ExampleComponent
|
||||
*/
|
||||
|
||||
import * as React from 'react'
|
||||
|
||||
import styles from './styles.css'
|
||||
|
||||
export type Props = { text: string }
|
||||
|
||||
export default class ExampleComponent extends React.Component<Props> {
|
||||
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()
|
||||
})
|
||||
})
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Default CSS definition for typescript,
|
||||
* will be overridden with file-specific definitions by rollup
|
||||
*/
|
||||
declare module '*.css' {
|
||||
const content: { [className: string]: string };
|
||||
export default content;
|
||||
}
|
||||
|
||||
interface SvgrComponent extends React.StatelessComponent<React.SVGAttributes<SVGElement>> {}
|
||||
|
||||
declare module '*.svg' {
|
||||
const svgUrl: string;
|
||||
const svgComponent: SvgrComponent;
|
||||
export default svgUrl;
|
||||
export { svgComponent as ReactComponent }
|
||||
}
|
||||
Reference in New Issue
Block a user