🏗 Sets up styled-components
This commit is contained in:
38
src/App.css
38
src/App.css
@@ -1,38 +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-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);
|
||||
}
|
||||
}
|
||||
|
||||
13
src/App.tsx
13
src/App.tsx
@@ -1,13 +1,22 @@
|
||||
import React from 'react';
|
||||
import Styled from 'styled-components';
|
||||
import Demo from 'components/Demo';
|
||||
import 'App.css';
|
||||
|
||||
const Container = Styled.div`
|
||||
background: #bfc;
|
||||
width: fit-content;
|
||||
margin: 1rem auto;
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: 6px;
|
||||
`;
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<div className="App">
|
||||
<Container className="App">
|
||||
<h1>Hello 👋</h1>
|
||||
<Demo message="React is Dumb," />
|
||||
</div>
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user