mirror of
https://github.com/bendtherules/ts-transformer-visualizer.git
synced 2026-08-18 13:51:48 +00:00
src, example - Formatr all files using prettier
This commit is contained in:
+5
-5
@@ -1,13 +1,13 @@
|
|||||||
import React, { Component } from 'react'
|
import React, { Component } from "react";
|
||||||
|
|
||||||
import ExampleComponent from 'ts-transformer-visualizer'
|
import ExampleComponent from "ts-transformer-visualizer";
|
||||||
|
|
||||||
export default class App extends Component {
|
export default class App extends Component {
|
||||||
render () {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<ExampleComponent text='Modern React component module' />
|
<ExampleComponent text="Modern React component module" />
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react'
|
import React from "react";
|
||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from "react-dom";
|
||||||
|
|
||||||
import './index.css'
|
import "./index.css";
|
||||||
import App from './App'
|
import App from "./App";
|
||||||
|
|
||||||
ReactDOM.render(<App />, document.getElementById('root'))
|
ReactDOM.render(<App />, document.getElementById("root"));
|
||||||
|
|||||||
+5
-11
@@ -2,22 +2,16 @@
|
|||||||
* @class ExampleComponent
|
* @class ExampleComponent
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as React from 'react'
|
import * as React from "react";
|
||||||
|
|
||||||
import styles from './styles.css'
|
import styles from "./styles.css";
|
||||||
|
|
||||||
export type Props = { text: string }
|
export type Props = { text: string };
|
||||||
|
|
||||||
export default class ExampleComponent extends React.Component<Props> {
|
export default class ExampleComponent extends React.Component<Props> {
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { text } = this.props;
|
||||||
text
|
|
||||||
} = this.props
|
|
||||||
|
|
||||||
return (
|
return <div className={styles.test}>Example Component: {text}</div>;
|
||||||
<div className={styles.test}>
|
|
||||||
Example Component: {text}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-6
@@ -1,7 +1,7 @@
|
|||||||
import ExampleComponent from './'
|
import ExampleComponent from "./";
|
||||||
|
|
||||||
describe('ExampleComponent', () => {
|
describe("ExampleComponent", () => {
|
||||||
it('is truthy', () => {
|
it("is truthy", () => {
|
||||||
expect(ExampleComponent).toBeTruthy()
|
expect(ExampleComponent).toBeTruthy();
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|||||||
Vendored
+5
-4
@@ -2,16 +2,17 @@
|
|||||||
* Default CSS definition for typescript,
|
* Default CSS definition for typescript,
|
||||||
* will be overridden with file-specific definitions by rollup
|
* will be overridden with file-specific definitions by rollup
|
||||||
*/
|
*/
|
||||||
declare module '*.css' {
|
declare module "*.css" {
|
||||||
const content: { [className: string]: string };
|
const content: { [className: string]: string };
|
||||||
export default content;
|
export default content;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface SvgrComponent extends React.StatelessComponent<React.SVGAttributes<SVGElement>> {}
|
interface SvgrComponent
|
||||||
|
extends React.StatelessComponent<React.SVGAttributes<SVGElement>> {}
|
||||||
|
|
||||||
declare module '*.svg' {
|
declare module "*.svg" {
|
||||||
const svgUrl: string;
|
const svgUrl: string;
|
||||||
const svgComponent: SvgrComponent;
|
const svgComponent: SvgrComponent;
|
||||||
export default svgUrl;
|
export default svgUrl;
|
||||||
export { svgComponent as ReactComponent }
|
export { svgComponent as ReactComponent };
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user