Skip to content

Commit

Permalink
feature/replace (#635)
Browse files Browse the repository at this point in the history
* chore: add biome

* chore: biome init

* chore: format

* chore: update fmt script

* chore: remove eslint

* chore: pnpm i

* chore: set name

* chore: vcs integration

* chore: add editorconfig

* chore: remove tailwind

* chore: pnpm i

* chore: remove tailwind

* chore: setup panda-css

* feat: configure entry css

* feat: replace
  • Loading branch information
anoriqq authored Oct 15, 2024
1 parent ffb092c commit 75ef66b
Show file tree
Hide file tree
Showing 19 changed files with 1,377 additions and 2,428 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
root = true

[*]
indent_style = tab
84 changes: 0 additions & 84 deletions .eslintrc.cjs

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ node_modules
/build
/public/build
.env

## Panda
styled-system
styled-system-studio
16 changes: 16 additions & 0 deletions app/components/body.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { css } from "styled-system/css";

export const Body: React.FC<React.PropsWithChildren> = ({ children }) => {
const className = css({
height: "full",
width: "full",
margin: "0",
lineHeight: "md",
color: "text",
backgroundColor: "background",
fontFamily: "sansserif",
fontSmoothing: "antialiased",
});

return <body className={className}>{children}</body>;
};
17 changes: 17 additions & 0 deletions app/components/html.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { css } from "styled-system/css";

export const Html: React.FC<React.PropsWithChildren> = ({ children }) => {
const className = css({
height: "full",
width: "full",
margin: "0",
boxSizing: "border-box",
lineHeight: "md",
});

return (
<html lang="en" className={className}>
{children}
</html>
);
};
18 changes: 6 additions & 12 deletions app/entry.client.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
/**
* By default, Remix will handle hydrating your app on the client for you.
* You are free to delete this file if you'd like to, but if you ever want it revealed again, you can run `npx remix reveal` ✨
* For more information, see https://remix.run/file-conventions/entry.client
*/

import { RemixBrowser } from "@remix-run/react";
import { startTransition, StrictMode } from "react";
import { hydrateRoot } from "react-dom/client";

startTransition(() => {
hydrateRoot(
document,
<StrictMode>
<RemixBrowser />
</StrictMode>
);
hydrateRoot(
document,
<StrictMode>
<RemixBrowser />
</StrictMode>,
);
});
1 change: 1 addition & 0 deletions app/root.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@layer reset, base, tokens, recipes, utilities;
87 changes: 49 additions & 38 deletions app/root.tsx
Original file line number Diff line number Diff line change
@@ -1,49 +1,60 @@
import type { LinksFunction, MetaFunction } from "@remix-run/node";
import {
Links,
Meta,
Outlet,
Scripts,
ScrollRestoration,
Links,
Meta,
Outlet,
Scripts,
ScrollRestoration,
} from "@remix-run/react";
import type { LinksFunction } from "@remix-run/node";
import type { FC, PropsWithChildren } from "react";

import styles from "./root.css?url"

import { Body } from "./components/body";
import { Html } from "./components/html";

export const meta: MetaFunction = () => [
{ title: "Remix" },
];

import "./tailwind.css";

export const links: LinksFunction = () => [
{ rel: "preconnect", href: "https://fonts.googleapis.com" },
{
rel: "preconnect",
href: "https://fonts.gstatic.com",
crossOrigin: "anonymous",
},
{
rel: "stylesheet",
href: "https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap",
},
{ rel: "preconnect", href: "https://fonts.googleapis.com" },
{
rel: "preconnect",
href: "https://fonts.gstatic.com",
crossOrigin: "anonymous",
},
{
rel: "stylesheet",
href: "https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap",
},
{ rel: "stylesheet", href: styles },
];

export function Layout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<Meta />
<Links />
</head>
<body>
{children}
<ScrollRestoration />
<Scripts />
</body>
</html>
);
}
export const Layout: FC<PropsWithChildren> = ({ children }) => {
return (
<Html>
<head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<Meta />
<Links />
</head>
<Body>
{children}
<ScrollRestoration />
<Scripts />
</Body>
</Html>
);
};

export default function App() {
return <Outlet />;
}
const App: FC = () => {
return <Outlet />;
};
export default App;

export function HydrateFallback() {
return <p>Loading...</p>;
return <p>Loading...</p>;
}
Loading

0 comments on commit 75ef66b

Please sign in to comment.