Skip to content

Commit

Permalink
feat: add announcement component
Browse files Browse the repository at this point in the history
  • Loading branch information
hngngn committed Feb 9, 2024
1 parent e7a1fd0 commit 4bb4113
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 23 deletions.
18 changes: 18 additions & 0 deletions apps/www/src/components/announcement.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Separator } from "@/registry/default/ui/separator"
import { A } from "@solidjs/router"

export const Announcement = () => {
return (
<A
href="/docs/changelog"
class="inline-flex items-center rounded-lg bg-muted px-3 py-1 text-sm font-medium"
>
🎉 <Separator class="mx-2 h-4" orientation="vertical" />{" "}
<span class="sm:hidden">New components and more.</span>
<span class="hidden sm:inline">
New components, cli updates and more.
</span>
<span class="icon-[tabler--arrow-right] ml-1 h-4 w-4" />
</A>
)
}
2 changes: 2 additions & 0 deletions apps/www/src/routes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Announcement } from "@/components/announcement"
import { Example } from "@/components/example"
import { siteConfig } from "@/config/site"
import { buttonVariants } from "@/registry/default/ui/button"
Expand All @@ -9,6 +10,7 @@ const Home = () => {
return (
<div class="container relative">
<section class="mx-auto flex max-w-[980px] flex-col items-center gap-2 py-8 md:py-12 md:pb-8 lg:py-24 lg:pb-20">
<Announcement />
<h1 class="text-center text-3xl font-bold leading-tight tracking-tighter md:text-6xl lg:leading-[1.1]">
Build your component library
</h1>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"eslint-config-turbo": "^1.10.13",
"eslint-plugin-solid": "^0.13.0",
"prettier": "^3.0.2",
"turbo": "^1.10.13"
"turbo": "^1.12.3"
},
"packageManager": "[email protected]",
"name": "shadcn-solid"
Expand Down
44 changes: 22 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4bb4113

Please sign in to comment.