File tree Expand file tree Collapse file tree 3 files changed +66
-7
lines changed Expand file tree Collapse file tree 3 files changed +66
-7
lines changed Original file line number Diff line number Diff line change 1+ .app {
2+ text-align : center;
3+ }
4+
5+ .app__logo {
6+ height : 40vmin ;
7+ pointer-events : none;
8+ }
9+
10+ @media (prefers-reduced-motion : no-preference) {
11+ .app-logo {
12+ animation : App-logo-spin infinite 20s linear;
13+ }
14+ }
15+
16+ .app__header {
17+ background-color : # 282c34 ;
18+ min-height : 100vh ;
19+ display : flex;
20+ flex-direction : column;
21+ align-items : center;
22+ justify-content : center;
23+ font-size : calc (10px + 2vmin );
24+ color : white;
25+ }
26+
27+ .app__link {
28+ color : # 61dafb ;
29+ }
30+
31+ @keyframes app__logo-spin {
32+ from {
33+ transform : rotate (0deg );
34+ }
35+ to {
36+ transform : rotate (360deg );
37+ }
38+ }
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import './app.css' ;
3+ import logo from '../assets/logo.svg' ;
4+
5+ export const App = ( ) : JSX . Element => {
6+ return (
7+ < div className = "app" >
8+ < header className = "app__header" >
9+ < img src = { logo } className = "app__logo" alt = "logo" />
10+ < p >
11+ Edit < code > src/app.tsx</ code > and save to reload.
12+ </ p >
13+ < a
14+ className = "app__link"
15+ href = "https://reactjs.org"
16+ target = "_blank"
17+ rel = "noopener noreferrer"
18+ >
19+ Learn React
20+ </ a >
21+ </ header >
22+ </ div >
23+ ) ;
24+ } ;
Original file line number Diff line number Diff line change 1- import React from "react" ;
2- import ReactDOM from "react-dom" ;
3-
4- const App = ( ) => (
5- < h1 > My React and TypeScript App!! { new Date ( ) . toLocaleDateString ( ) } </ h1 >
6- ) ;
1+ import React from 'react' ;
2+ import ReactDOM from 'react-dom' ;
3+ import { App } from './components/app' ;
74
85ReactDOM . render (
96 < React . StrictMode >
107 < App />
118 </ React . StrictMode > ,
12- document . getElementById ( " root" )
9+ document . getElementById ( ' root' ) ,
1310) ;
You can’t perform that action at this time.
0 commit comments