install prettier
This commit is contained in:
53
src/App.css
53
src/App.css
@@ -1,53 +0,0 @@
|
||||
.App {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.App-logo {
|
||||
height: 40vmin;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
.App-logo {
|
||||
animation: App-logo-spin infinite 20s linear;
|
||||
}
|
||||
.App-logo.spin-reverse {
|
||||
animation: App-logo-spin-reverse infinite 20s linear;
|
||||
}
|
||||
}
|
||||
|
||||
.App-header {
|
||||
background-color: #282c34;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: calc(10px + 2vmin);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.App-link {
|
||||
color: #61dafb;
|
||||
}
|
||||
|
||||
@keyframes App-logo-spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@keyframes App-logo-spin-reverse {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(-360deg);
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
font-size: calc(10px + 2vmin);
|
||||
}
|
||||
|
28
src/App.tsx
28
src/App.tsx
@@ -17,7 +17,7 @@ const Greeter: React.FC<GreeterProps> = ({ name, setName }) => {
|
||||
autoFocus
|
||||
type="text"
|
||||
style={{
|
||||
width: Math.max(100, 14 * name.length) + "px",
|
||||
width: Math.max(100, 10 * name.length) + "px",
|
||||
}}
|
||||
value={name}
|
||||
onChange={(e) => setName(e.target.value)}
|
||||
@@ -30,20 +30,20 @@ function App() {
|
||||
const [count, setCount] = useState(0);
|
||||
const [name, setName] = useState("");
|
||||
return (
|
||||
<div className="App">
|
||||
<header className="App-header">
|
||||
<img
|
||||
src={logo}
|
||||
className="App-logo"
|
||||
alt="logo"
|
||||
style={{
|
||||
animationDuration: `${20 / (name.length || 1)}s`,
|
||||
}}
|
||||
/>
|
||||
<p>Hello Vite + React!</p>
|
||||
<div className="bg-regal-blue text-white bg-opacity-90 flex flex-col items-center justify-center h-screen">
|
||||
<img
|
||||
src={logo}
|
||||
className="w-1/2"
|
||||
alt="logo"
|
||||
style={{
|
||||
animationDuration: `${20 / (name.length || 1)}s`,
|
||||
}}
|
||||
/>
|
||||
<div className="text-center">
|
||||
<p className="text-3xl">Hello Vite + React!</p>
|
||||
<p>
|
||||
<button
|
||||
className="bg-blue-400 bg-opacity-60 hover:bg-blue-600 p-2 rounded m-2"
|
||||
className="text-xl shadow bg-blue-400 bg-opacity-60 hover:bg-blue-600 p-2 rounded m-2"
|
||||
type="button"
|
||||
onClick={() => setCount((count) => count + 1)}
|
||||
>
|
||||
@@ -51,7 +51,7 @@ function App() {
|
||||
</button>
|
||||
</p>
|
||||
<Greeter name={name} setName={setName} />
|
||||
</header>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
12
src/main.tsx
12
src/main.tsx
@@ -1,11 +1,11 @@
|
||||
import React from 'react'
|
||||
import ReactDOM from 'react-dom'
|
||||
import './index.css'
|
||||
import App from './App'
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
import "./index.css";
|
||||
import App from "./App";
|
||||
|
||||
ReactDOM.render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>,
|
||||
document.getElementById('root')
|
||||
)
|
||||
document.getElementById("root")
|
||||
);
|
||||
|
Reference in New Issue
Block a user