Skip to content

Commit

Permalink
chore: updated RegisterForm default texts
Browse files Browse the repository at this point in the history
  • Loading branch information
zaaakher committed Feb 2, 2024
1 parent 4ffa42c commit 15e1787
Show file tree
Hide file tree
Showing 17 changed files with 217 additions and 162 deletions.
7 changes: 7 additions & 0 deletions apps/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# hawa-docs

## 0.0.18

### Patch Changes

- Updated dependencies
- @sikka/hawa@0.27.14

## 0.0.17

### Patch Changes
Expand Down
50 changes: 28 additions & 22 deletions apps/docs/__registry__/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,34 @@ import * as React from "react"

export const Index: Record<string, any> = {
"default": {
"accordion-demo": {
name: "accordion-demo",
type: "components:example",
registryDependencies: ["accordion"],
component: React.lazy(() => import("@/registry/default/example/accordion-demo")),
files: ["registry/default/example/accordion-demo.tsx"],
},
"login-form-demo": {
name: "login-form-demo",
type: "components:example",
registryDependencies: ["accordion"],
component: React.lazy(() => import("@/registry/default/example/login-form-demo")),
files: ["registry/default/example/login-form-demo.tsx"],
},
"register-form-demo": {
name: "register-form-demo",
type: "components:example",
registryDependencies: ["accordion"],
component: React.lazy(() => import("@/registry/default/example/register-form-demo")),
files: ["registry/default/example/register-form-demo.tsx"],
},
"app-layout-demo": {
name: "app-layout-demo",
type: "components:example",
registryDependencies: ["accordion"],
component: React.lazy(() => import("@/registry/default/example/app-layout-demo")),
files: ["registry/default/example/app-layout-demo.tsx"],
},
"accordion": {
name: "accordion",
type: "components:ui",
Expand Down Expand Up @@ -306,27 +334,6 @@ export const Index: Record<string, any> = {
component: React.lazy(() => import("@/registry/default/ui/tooltip")),
files: ["registry/default/ui/tooltip.tsx"],
},
"accordion-demo": {
name: "accordion-demo",
type: "components:example",
registryDependencies: ["accordion"],
component: React.lazy(() => import("@/registry/default/example/accordion-demo")),
files: ["registry/default/example/accordion-demo.tsx"],
},
"login-form-demo": {
name: "login-form-demo",
type: "components:example",
registryDependencies: ["accordion"],
component: React.lazy(() => import("@/registry/default/example/login-form-demo")),
files: ["registry/default/example/login-form-demo.tsx"],
},
"app-layout-demo": {
name: "app-layout-demo",
type: "components:example",
registryDependencies: ["accordion"],
component: React.lazy(() => import("@/registry/default/example/app-layout-demo")),
files: ["registry/default/example/app-layout-demo.tsx"],
},
"alert-demo": {
name: "alert-demo",
type: "components:example",
Expand Down Expand Up @@ -1006,7 +1013,6 @@ export const Index: Record<string, any> = {
component: React.lazy(() => import("@/registry/default/example/toast-demo")),
files: ["registry/default/example/toast-demo.tsx"],
},

"toggle-group-demo": {
name: "toggle-group-demo",
type: "components:example",
Expand Down
10 changes: 5 additions & 5 deletions apps/docs/app/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import { getTableOfContents } from "@/lib/toc";
import { absoluteUrl, cn } from "@/lib/utils";
import { badgeVariants } from "@/registry/default/ui/badge";
import "@/styles/mdx.css";
import { ChevronRightIcon, ExternalLinkIcon } from "@radix-ui/react-icons";
import { allDocs } from "contentlayer/generated";
import type { Metadata } from "next";
import Link from "next/link";
import { notFound } from "next/navigation";

import { ScrollArea } from "@sikka/hawa/scrollArea";
import { ArrowUpRightFromSquare, ChevronRight } from "lucide-react";

interface DocPageProps {
params: {
Expand Down Expand Up @@ -93,7 +93,7 @@ export default async function DocPage({ params }: DocPageProps) {
<div className="overflow-hidden text-ellipsis whitespace-nowrap">
Docs
</div>
<ChevronRightIcon className="h-4 w-4" />
<ChevronRight className="h-4 w-4" />
<div className="text-foreground font-medium">{doc.title}</div>
</div>
<div className="space-y-2">
Expand All @@ -116,7 +116,7 @@ export default async function DocPage({ params }: DocPageProps) {
className={cn(badgeVariants({ variant: "secondary" }), "gap-1")}
>
Docs
<ExternalLinkIcon className="h-3 w-3" />
<ArrowUpRightFromSquare className="h-3 w-3" />
</Link>
)}
{doc.links?.api && (
Expand All @@ -127,7 +127,7 @@ export default async function DocPage({ params }: DocPageProps) {
className={cn(badgeVariants({ variant: "secondary" }), "gap-1")}
>
API Reference
<ExternalLinkIcon className="h-3 w-3" />
<ArrowUpRightFromSquare className="h-3 w-3" />
</Link>
)}
{doc.links?.storybook && (
Expand All @@ -138,7 +138,7 @@ export default async function DocPage({ params }: DocPageProps) {
className={cn(badgeVariants({ variant: "secondary" }), "gap-1")}
>
Storybook
<ExternalLinkIcon className="h-3 w-3" />
<ArrowUpRightFromSquare className="h-3 w-3" />
</Link>
)}
</div>
Expand Down
3 changes: 0 additions & 3 deletions apps/docs/components/announcement.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { Separator } from "@/registry/default/ui/separator";
import { ArrowRightIcon } from "@radix-ui/react-icons";
import Link from "next/link";

export function Announcement() {
Expand All @@ -12,7 +10,6 @@ export function Announcement() {
<span className="hidden sm:inline">
We're currently building the docs
</span>
{/* <ArrowRightIcon className="ml-1 h-4 w-4" /> */}
</Link>
);
}
6 changes: 3 additions & 3 deletions apps/docs/components/mode-toggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
DropdownMenuItem,
DropdownMenuTrigger
} from "@/registry/default/ui/dropdown-menu";
import { MoonIcon, SunIcon } from "@radix-ui/react-icons";
import { useTheme } from "next-themes";
import { Moon, Sun } from "lucide-react";

export function ModeToggle() {
const { setTheme } = useTheme();
Expand All @@ -19,8 +19,8 @@ export function ModeToggle() {
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="ghost" className="w-9 px-0">
<SunIcon className="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
<MoonIcon className="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
<Sun className="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
<Moon className="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
<span className="sr-only">Toggle theme</span>
</Button>
</DropdownMenuTrigger>
Expand Down
19 changes: 7 additions & 12 deletions apps/docs/config/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,22 @@ export const docsConfig: DocsConfig = {
{ title: "Introduction", href: "/docs", items: [] },
{ title: "Installation", href: "/docs/installation", items: [] },
{ title: "Texts", href: "/docs/texts", items: [] },
// { title: "Theming", href: "/docs/theming", items: [] },
// { title: "Dark mode", href: "/docs/dark-mode", items: [] },
// { title: "CLI", href: "/docs/cli", items: [] },
// { title: "Typography", href: "/docs/elements/typography", items: [] },
{ title: "Changelog", href: "/docs/changelog", items: [] }
]
},
{
title: "Hooks",
items: [
{
title: "useToast",
href: "/docs/hooks/use-toast",
items: []
}
]
items: [{ title: "useToast", href: "/docs/hooks/use-toast", items: [] }]
},
{
title: "Blocks",
items: [
{ title: "Login Form", href: "/docs/blocks/login-form", items: [] }
{ title: "Login Form", href: "/docs/blocks/login-form", items: [] },
{
title: "Register Form",
href: "/docs/blocks/register-form",
items: []
}
]
},
{
Expand Down
14 changes: 14 additions & 0 deletions apps/docs/content/docs/blocks/register-form.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Register Form
description: a form for user registration
featured: true
component: true
links:
storybook: https://storybook.hawa.style/?path=/story/blocks-user-auth-register-form--default
---

<ComponentPreview name="register-form-demo" />

## Props

The following props can be passed to the component
1 change: 0 additions & 1 deletion apps/docs/content/docs/changelog.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: Changelog
description: Latest updates and announcements.
toc: false
---

# @sikka/hawa
Expand Down
3 changes: 2 additions & 1 deletion apps/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "hawa-docs",
"version": "0.0.17",
"version": "0.0.18",
"private": true,
"type": "module",
"scripts": {
"dev": "next dev -p 3001",
"build": "npm run sync:changelog && contentlayer build && next build",
Expand Down
7 changes: 7 additions & 0 deletions apps/docs/registry/default/example/register-form-demo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from "react";

import { RegisterForm } from "@sikka/hawa/blocks";

export default function LoginFormDemo() {
return <RegisterForm onRegister={(data) => console.log("data is ", data)} />;
}
Loading

0 comments on commit 15e1787

Please sign in to comment.