Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: docs minnor fixes #69

Merged
merged 3 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/orange-wombats-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"docs": patch
"@stepperize/react": patch
---

chore: docs minnor fixes
38 changes: 22 additions & 16 deletions apps/docs/.source/index.js

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

18 changes: 9 additions & 9 deletions apps/docs/app/layout.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { NavChildren } from "@/app/layout.client";
import { source } from "@/app/source";
import { modes } from "@/lib/modes";
import { RootToggle } from "fumadocs-ui/components/layout/root-toggle";
import { BookIcon, Waypoints } from "lucide-react";
import { Waypoints } from "lucide-react";

export const baseOptions: HomeLayoutProps = {
githubUrl: "https://github.com/damianricobelli/stepperize",
Expand All @@ -19,14 +19,14 @@ export const baseOptions: HomeLayoutProps = {
transparentMode: "top",
children: <NavChildren />,
},
links: [
{
icon: <BookIcon />,
text: "Blog",
url: "/blog",
active: "nested-url",
},
],
// links: [
// {
// icon: <BookIcon />,
// text: "Blog",
// url: "/blog",
// active: "nested-url",
// },
// ],
};

export const docsOptions: DocsLayoutProps = {
Expand Down
34 changes: 2 additions & 32 deletions apps/docs/components/demo-viewer.tsx
Original file line number Diff line number Diff line change
@@ -1,39 +1,9 @@
"use client";

import { Skeleton } from "@/components/ui/skeleton";
import { cva } from "class-variance-authority";
import { useEffect, useState } from "react";

export const DemoViewer = ({ src, className }: { src: string; className?: string }) => {
const [isLoaded, setIsLoaded] = useState(false);

useEffect(() => {
setIsLoaded(false);
}, [src]);

return (
<>
{!isLoaded && (
<Skeleton className={classForDemoViewer({ className })}>
<span>Loading demo...</span>
</Skeleton>
)}
<iframe
src={src}
title="Demo Viewer"
className={classForDemoViewer({ className, isLoaded })}
onLoad={() => setIsLoaded(true)}
style={{ display: isLoaded ? "block" : "none" }}
/>
</>
);
return <iframe src={src} title="Demo Viewer" className={classForDemoViewer({ className })} />;
};

const classForDemoViewer = cva("w-full h-[600px] border rounded-md flex items-center justify-center", {
variants: {
isLoaded: {
true: "opacity-100",
false: "opacity-0",
},
},
});
const classForDemoViewer = cva("w-full h-[600px] border rounded-md");
2 changes: 0 additions & 2 deletions apps/docs/content/docs/react/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,3 @@ Stepperize goes beyond linear progressions, enabling:
- Personalized user experiences
- State-dependent UI changes
- Multi-path processes

## Getting Started
9 changes: 9 additions & 0 deletions apps/docs/content/docs/solid/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Introduction
description: A powerful library for creating flexible Stepper components in Solid
icon: Album
---

<Callout type="warn">
Both the documents and the Solid package are not yet ready.
</Callout>
5 changes: 5 additions & 0 deletions apps/docs/content/docs/solid/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"title": "Solid",
"root": true,
"pages": ["---Getting Started---", "index"]
}
9 changes: 9 additions & 0 deletions apps/docs/content/docs/svelte/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Introduction
description: A powerful library for creating flexible Stepper components in Svelte
icon: Album
---

<Callout type="warn">
Both the documents and the Svelte package are not yet ready.
</Callout>
5 changes: 5 additions & 0 deletions apps/docs/content/docs/svelte/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"title": "Svelte",
"root": true,
"pages": ["---Getting Started---", "index"]
}
9 changes: 9 additions & 0 deletions apps/docs/content/docs/vue/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Introduction
description: A powerful library for creating flexible Stepper components in Vue
icon: Album
---

<Callout type="warn">
Both the documents and the Vue package are not yet ready.
</Callout>
5 changes: 5 additions & 0 deletions apps/docs/content/docs/vue/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"title": "Vue",
"root": true,
"pages": ["---Getting Started---", "index"]
}
8 changes: 3 additions & 5 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,15 @@
},
"homepage": "https://stepperize.vercel.app",
"sideEffects": false,
"files": [
"dist"
],
"files": ["dist"],
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
"require": "./dist/index.js"
}
},
"scripts": {
Expand Down