Skip to content

Instantly share code, notes, and snippets.

@n8rzz
Created January 24, 2022 02:08
Show Gist options
  • Save n8rzz/85de718bb7560d85116745c7ebe0b210 to your computer and use it in GitHub Desktop.
Save n8rzz/85de718bb7560d85116745c7ebe0b210 to your computer and use it in GitHub Desktop.
app-index-and-css.tsx
/**
* src/App.tsx
*/
import "./styles.css";
import React from "react";
import { Card } from "./Card";
interface IProps {}
export const App: React.FC<IProps> = (props) => {
return (
<div className="app">
<ul className="hlist">
<li>
<Card />
</li>
<li>
<Card />
</li>
</ul>
</div>
);
};
/**
* index.tsx
*/
import { render } from "react-dom";
import { App } from "./App";
const rootElement = document.getElementById("root");
render(<App />, rootElement);
/**
* styles.css
*/
.app {
font-family: sans-serif;
padding: 20px 0;
text-align: center;
}
.card {
border: 1px solid green;
}
.hlist {
display: flex;
justify-content: center;
list-style-type: none;
margin: 0;
padding: 0;
}
.hlist > * + * {
margin-left: 2rem;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment