From 12a1b12bac053cf8bebf37250aab4f0f64622d80 Mon Sep 17 00:00:00 2001 From: Valerio Ageno Date: Thu, 6 Jun 2024 19:15:07 +0200 Subject: [PATCH] feat: clean up base tuono example --- examples/tuono/README.md | 8 +++++++- examples/tuono/package.json | 3 ++- examples/tuono/src/components/Button.tsx | 3 --- examples/tuono/src/routes/__root.tsx | 7 ++----- examples/tuono/src/routes/index.tsx | 10 ++++++++-- examples/tuono/src/styles/global.css | 20 ++++++++++++++++++++ 6 files changed, 39 insertions(+), 12 deletions(-) delete mode 100644 examples/tuono/src/components/Button.tsx diff --git a/examples/tuono/README.md b/examples/tuono/README.md index b3b5a8c6..72b0fe6d 100644 --- a/examples/tuono/README.md +++ b/examples/tuono/README.md @@ -1,3 +1,9 @@ -# TODO: Basic Tuono app +# Tuono starter + +This is the starter tuono project. To download it run in your terminal: + +```shell +$ tuono new [NAME] +``` diff --git a/examples/tuono/package.json b/examples/tuono/package.json index c9216d8d..9e0d88d3 100644 --- a/examples/tuono/package.json +++ b/examples/tuono/package.json @@ -1,10 +1,11 @@ { "name": "tuono", + "description": "The react/rust fullstack framework", "version": "0.0.1", "dependencies": { "react": "18.3.1", "react-dom": "18.3.1", - "tuono": "workspace:*" + "tuono": "link:../../packages/tuono" }, "devDependencies": { "@types/react": "^18.3.3", diff --git a/examples/tuono/src/components/Button.tsx b/examples/tuono/src/components/Button.tsx deleted file mode 100644 index 83872f78..00000000 --- a/examples/tuono/src/components/Button.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function Button(): JSX.Element { - return -} diff --git a/examples/tuono/src/routes/__root.tsx b/examples/tuono/src/routes/__root.tsx index 52d29f69..1a39e91f 100644 --- a/examples/tuono/src/routes/__root.tsx +++ b/examples/tuono/src/routes/__root.tsx @@ -3,10 +3,7 @@ import type { ReactNode } from 'react' interface RootRouteProps { children: ReactNode } + export default function RootRoute({ children }: RootRouteProps): JSX.Element { - return ( - <> -
{children}
- - ) + return
{children}
} diff --git a/examples/tuono/src/routes/index.tsx b/examples/tuono/src/routes/index.tsx index 23f8bbe0..2c1ce2f0 100644 --- a/examples/tuono/src/routes/index.tsx +++ b/examples/tuono/src/routes/index.tsx @@ -1,8 +1,9 @@ import type { TuonoProps } from 'tuono' -type IndexProps = { +interface IndexProps { subtitle: string } + export default function IndexPage({ data, isLoading, @@ -32,7 +33,12 @@ export default function IndexPage({

{data?.subtitle}

- + Github
diff --git a/examples/tuono/src/styles/global.css b/examples/tuono/src/styles/global.css index bc4a7312..84fc0842 100644 --- a/examples/tuono/src/styles/global.css +++ b/examples/tuono/src/styles/global.css @@ -51,12 +51,32 @@ main { z-index: 0; letter-spacing: -2px; margin-left: -8px; + user-select: none; + pointer-events: none; } .title span { opacity: 0; } +.button { + width: 140px; + height: 30px; + border: solid 3px black; + border-radius: 10px; + color: black; + text-decoration: none; + display: flex; + justify-content: center; + align-items: center; + transition: 0.2s; +} + +.button:hover { + color: white; + background: black; +} + .logo { margin-left: 240px; position: relative;