diff --git a/src/App.css b/src/App.css index 8da3fde..18fc57c 100644 --- a/src/App.css +++ b/src/App.css @@ -11,6 +11,9 @@ .App-logo { animation: App-logo-spin infinite 20s linear; } + .App-logo.spin-reverse { + animation: App-logo-spin-reverse infinite 20s linear; + } } .App-header { @@ -36,6 +39,14 @@ transform: rotate(360deg); } } +@keyframes App-logo-spin-reverse { + from { + transform: rotate(0deg); + } + to { + transform: rotate(-360deg); + } +} button { font-size: calc(10px + 2vmin); diff --git a/src/App.tsx b/src/App.tsx index 296a7ee..5ce233a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,45 +1,44 @@ -import React, { useState } from 'react' -import logo from './logo.svg' -import './App.css' +import React, { useState } from "react"; +import logo from "./logo.svg"; +import "./App.css"; + +interface GreeterProps {} + +const Greeter: React.FC = (props) => { + const [name, setName] = useState(""); + return ( +
+
{name.length ? <>Hello {name} : <>What is your name? }
+ setName(e.target.value)} + /> +
+ ); +}; function App() { - const [count, setCount] = useState(0) - + const [count, setCount] = useState(0); return (
- logo + logo

Hello Vite + React!

-

- Edit App.tsx and save to test HMR updates. -

-

- - Learn React - - {' | '} - - Vite Docs - -

+
- ) + ); } -export default App +export default App;