-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
33 lines (26 loc) · 986 Bytes
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import * as React from 'react';
import Button from 'material-ui/Button';
// VS Code cannot find definition for the above import and shows error:
// Could not find a declaration file for module 'material-ui/Button'.
// '/material-ui-tsx/node_modules/material-ui/Button/index.js'
// implicitly has an 'any' type. Try `npm install @types/material-ui/Button` if it exists
// or add a new declaration (.d.ts) file containing `declare module 'material-ui/Button';`
// import { Button } from 'material-ui';
// VS Code finds definition with the above import but react throws this error after 'npm start':
// Failed to compile.
// \material-ui-tsx\node_modules\material-ui\index.d.ts
// (2122,25): error TS2307: Cannot find module 'enzyme'.
export default class App extends React.Component {
constructor(props: any) {
super(props);
}
render() {
return (
<div>
<Button raised={true} color="primary">
Click
</Button>
</div>
);
}
}