1
0
Fork 0

refactor: monorepified && npm workspaces

This commit is contained in:
Vojtěch Mareš 2022-01-04 01:03:34 +01:00
parent 973c247893
commit 9b0c9d0854
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D
26 changed files with 349 additions and 3727 deletions

View file

@ -0,0 +1,47 @@
import type SectionType from './../types/section';
type Props = {
sections: SectionType[];
};
const Grid = ({ sections }: Props) => (
<div className="grid xlg:grid-cols-5 lg:grid-cols-4 sm:grid-cols-2 grid-cols-1 gap-4">
{sections.map((section) => (
<section key={section.name} className="mt-2">
<h2 className="font-sans font-semibold text-2xl mb-4">
{section.name}
</h2>
<ul>
{section.items.map((item) => (
<li key={item.name} className="my-2">
<a
href={item.url}
target="_blank"
rel="noopener noreferrer"
className="
block
w-full
text-center
py-2
border-2
border-gray-400
rounded
hover:bg-gray-900
hover:border-gray-900
hover:text-white
transition
focus:ring-2
focus:ring-gray-600 text-gray-800
"
>
{item.name}
</a>
</li>
))}
</ul>
</section>
))}
</div>
);
export default Grid;

View file

@ -0,0 +1,11 @@
import { ReactNode, FunctionComponent } from 'react';
type LayoutPropsType = {
children?: ReactNode;
};
const Layout: FunctionComponent = ({ children }: LayoutPropsType) => (
<div className="lg:px-32 md:px-16 px-4 py-4">{children}</div>
);
export default Layout;

View file

@ -0,0 +1,13 @@
{
"name": "@themes/signpost",
"private": true,
"version": "0.0.0",
"author": "Vojtech Mares <iam@vojtechmares.com>",
"devDependencies": {
"@types/react": "^17.0.34",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"tailwindcss": "^3.0.8",
"typescript": "^4.4.4"
}
}

View file

@ -0,0 +1,9 @@
type SectionType = {
name: string;
items: {
name: string;
url: string;
}[];
};
export default SectionType;