Hello.tsx 597 B

1234567891011121314151617181920212223242526
  1. import * as React from 'react';
  2. import Button from '@material-ui/core/Button';
  3. import './Hello.scss'
  4. export interface HelloProps {
  5. compiler: string;
  6. framework: string;
  7. }
  8. export default class Hello extends React.Component <HelloProps, {}> {
  9. render() {
  10. function print() {
  11. console.log(13)
  12. }
  13. return (
  14. <div>
  15. <h1>Hello from {this.props.compiler} and {this.props.framework}</h1>
  16. <div className="name">名字颜色</div>
  17. <Button variant="contained" color="primary" onClick={print}>
  18. Hello World
  19. </Button>
  20. </div>
  21. );
  22. }
  23. }