Restructure code

This commit is contained in:
KingRainbow44
2022-05-08 18:51:35 -04:00
parent 2019eae7b1
commit 8b51488a41
7 changed files with 2 additions and 2 deletions

38
src/ui/App.css Normal file
View File

@@ -0,0 +1,38 @@
.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-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);
}
}

9
src/ui/App.test.tsx Normal file
View File

@@ -0,0 +1,9 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import App from './App';
test('renders learn react link', () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});

17
src/ui/App.tsx Normal file
View File

@@ -0,0 +1,17 @@
import React from 'react';
import logo from './logo.svg';
import './App.css';
function buttonFunctionality() {
alert('Button clicked!');
}
function App() {
return (
<div className="App">
<button onClick={buttonFunctionality}>Cool button</button>
</div>
);
}
export default App;