diff --git a/.gitignore b/.gitignore
index 81ca99ed4..a0c91f387 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,6 +18,8 @@ dist
.DS_Store
*.pem
+www-old/
+
# debug
npm-debug.log*
yarn-debug.log*
@@ -37,4 +39,4 @@ yarn-error.log*
.vercel
# vscode plugin
-*.vsix
\ No newline at end of file
+*.vsix
diff --git a/apps/www/.gitignore b/apps/www/.gitignore
index 55a12ae71..c09047d52 100644
--- a/apps/www/.gitignore
+++ b/apps/www/.gitignore
@@ -1,28 +1,44 @@
-# deps
-/node_modules
+# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
-# generated content
-.contentlayer
-.content-collections
-.source
+# dependencies
+/node_modules
+/.pnp
+.pnp.*
+.yarn/*
+!.yarn/patches
+!.yarn/plugins
+!.yarn/releases
+!.yarn/versions
-# test & build
+# testing
/coverage
+
+# next.js
/.next/
/out/
+
+# production
/build
-*.tsbuildinfo
# misc
.DS_Store
*.pem
-/.pnp
-.pnp.js
+
+# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
+.pnpm-debug.log*
-# others
-.env*.local
+# env files (can opt-in for committing if needed)
+.env*
+
+# vercel
.vercel
-next-env.d.ts
\ No newline at end of file
+
+# typescript
+*.tsbuildinfo
+next-env.d.ts
+
+# fumadocs source
+.source
diff --git a/apps/www/README.md b/apps/www/README.md
index e1a157820..e215bc4cc 100644
--- a/apps/www/README.md
+++ b/apps/www/README.md
@@ -1,26 +1,36 @@
-# fuma-base
+This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
-This is a Next.js application generated with
-[Create Fumadocs](https://github.com/fuma-nama/fumadocs).
+## Getting Started
-Run development server:
+First, run the development server:
```bash
npm run dev
# or
+yarn dev
+# or
pnpm dev
# or
-yarn dev
+bun dev
```
-Open http://localhost:3000 with your browser to see the result.
+Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
+
+You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
+
+This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
## Learn More
-To learn more about Next.js and Fumadocs, take a look at the following
-resources:
+To learn more about Next.js, take a look at the following resources:
-- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js
- features and API.
+- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
-- [Fumadocs](https://fumadocs.vercel.app) - learn about Fumadocs
+
+You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
+
+## Deploy on Vercel
+
+The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
+
+Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
diff --git a/apps/www/next.config.mjs b/apps/www/next.config.mjs
index 20a35b725..fce83cf28 100644
--- a/apps/www/next.config.mjs
+++ b/apps/www/next.config.mjs
@@ -1,7 +1,5 @@
import { createMDX } from 'fumadocs-mdx/next';
-const withMDX = createMDX();
-
/** @type {import('next').NextConfig} */
const config = {
reactStrictMode: true,
@@ -12,11 +10,6 @@ const config = {
// !! WARN !!
ignoreBuildErrors: true
},
- eslint: {
- // Warning: This allows production builds to successfully complete even if
- // your project has ESLint errors.
- ignoreDuringBuilds: true
- },
experimental: {
optimizePackageImports: ['shiki']
},
@@ -31,7 +24,19 @@ const config = {
destination: '/llms.mdx/:path*'
}
];
+ },
+ async redirects() {
+ // TODO: remove this once we have a proper home page
+ return [
+ {
+ source: '/',
+ destination: '/docs',
+ permanent: true
+ }
+ ];
}
};
+const withMDX = createMDX();
+
export default withMDX(config);
diff --git a/apps/www/package.json b/apps/www/package.json
index 316a76861..1cf03b2aa 100644
--- a/apps/www/package.json
+++ b/apps/www/package.json
@@ -1,29 +1,31 @@
{
"name": "www",
- "version": "1.0.0",
+ "version": "0.1.0",
"private": true,
"scripts": {
"prebuild": "cd ../.. && npm run build:apsara",
- "build": "next build",
"dev": "next dev",
+ "build": "next build",
"start": "next start",
"postinstall": "fumadocs-mdx"
},
"dependencies": {
+ "@radix-ui/react-icons": "^1.3.2",
"@raystack/apsara": "workspace:*",
+ "@types/mdast": "^4.0.4",
"class-variance-authority": "^0.7.1",
"dayjs": "^1.11.11",
- "fumadocs-core": "^14.7.7",
+ "fumadocs-core": "16.0.7",
"fumadocs-docgen": "^1.3.8",
- "fumadocs-mdx": "^11.5.6",
+ "fumadocs-mdx": "13.0.5",
"fumadocs-typescript": "^4.0.6",
- "fumadocs-ui": "^14.7.7",
- "lucide-react": "^0.477.0",
- "next": "14.2.5",
+ "fumadocs-ui": "16.0.7",
+ "lucide-react": "^0.548.0",
+ "next": "16.0.7",
"next-themes": "^0.4.4",
"prettier": "^2.8.8",
- "react": "^18.3.1",
- "react-dom": "^18.3.1",
+ "react": "^19.2.1",
+ "react-dom": "^19.2.1",
"react-live": "^4.1.8",
"remark": "^15.0.1",
"remark-gfm": "^4.0.1",
@@ -32,15 +34,11 @@
"zod": "^3.24.2"
},
"devDependencies": {
- "@types/mdast": "^4.0.4",
"@types/mdx": "^2.0.13",
- "@types/node": "22.13.4",
- "@types/prettier": "^3.0.0",
- "@types/react": "^18.0.28",
- "@types/react-dom": "^18.0.11",
- "eslint": "^8",
- "eslint-config-next": "14",
- "typescript": "^5.7.3"
+ "@types/node": "^24.9.2",
+ "@types/react": "^19.2.2",
+ "@types/react-dom": "^19.2.2",
+ "typescript": "^5.9.3"
},
"engines": {
"node": ">=22"
diff --git a/apps/www/public/assets/logo.png b/apps/www/public/assets/logo.png
index 61cad6a69..c4be1ab12 100644
Binary files a/apps/www/public/assets/logo.png and b/apps/www/public/assets/logo.png differ
diff --git a/apps/www/public/assets/logo.svg b/apps/www/public/assets/logo.svg
deleted file mode 100644
index a678b0b18..000000000
--- a/apps/www/public/assets/logo.svg
+++ /dev/null
@@ -1,20 +0,0 @@
-
diff --git a/apps/www/source.config.ts b/apps/www/source.config.ts
index d5852b227..1e0978753 100644
--- a/apps/www/source.config.ts
+++ b/apps/www/source.config.ts
@@ -1,11 +1,19 @@
import * as path from 'node:path';
import { fileURLToPath } from 'url';
-import { TagSchema } from '@/lib/types';
-import { remarkInstall } from 'fumadocs-docgen';
+import { SourceSchema, TagSchema } from '@/lib/types';
+import {
+ rehypeToc,
+ remarkGfm,
+ remarkHeading,
+ remarkImage,
+ remarkNpm,
+ remarkStructure
+} from 'fumadocs-core/mdx-plugins';
import {
defineConfig,
defineDocs,
- frontmatterSchema
+ frontmatterSchema,
+ metaSchema
} from 'fumadocs-mdx/config';
import {
GeneratorOptions,
@@ -28,13 +36,32 @@ export const docs = defineDocs({
dir: 'src/content/docs',
docs: {
schema: frontmatterSchema.extend({
+ source: SourceSchema,
tag: TagSchema
- })
+ }),
+ postprocess: {
+ includeProcessedMarkdown: true
+ }
+ },
+ meta: {
+ schema: metaSchema
}
});
export default defineConfig({
mdxOptions: {
- remarkPlugins: [remarkInstall, [remarkAutoTypeTable, { generator }]]
+ remarkPlugins: () => {
+ return [
+ remarkGfm,
+ [remarkHeading, { generateToc: false }],
+ [remarkImage, { useImport: undefined }],
+ // remarkCodeTab,
+ remarkNpm,
+ remarkStructure,
+ // remarkInstall,
+ [remarkAutoTypeTable, { generator }]
+ ];
+ },
+ rehypePlugins: () => [rehypeToc]
}
});
diff --git a/apps/www/src/app/(home)/page.tsx b/apps/www/src/app/(home)/page.tsx
index 4544dddb8..c4cc58d48 100644
--- a/apps/www/src/app/(home)/page.tsx
+++ b/apps/www/src/app/(home)/page.tsx
@@ -1,17 +1,15 @@
-import Logo from "@/components/logo";
-import { Card } from "fumadocs-ui/components/card";
-import { Notebook, Paintbrush } from "lucide-react";
-import styles from "./page.module.css";
+import Logo from '@/components/logo';
+import styles from './page.module.css';
export const metadata = {
- title: "Apsara",
+ title: 'Apsara'
};
export default function HomePage() {
return (
-
+
The design system
for the next big thing
@@ -21,22 +19,6 @@ export default function HomePage() {
built using Radix UI.
-
- }
- href="/docs"
- className={styles.card}
- />
- }
- href="/playground"
- className={styles.card}
- />
-
);
}
diff --git a/apps/www/src/app/api/search/route.ts b/apps/www/src/app/api/search/route.ts
index 570732244..b7ff59245 100644
--- a/apps/www/src/app/api/search/route.ts
+++ b/apps/www/src/app/api/search/route.ts
@@ -1,4 +1,6 @@
-import { docs } from "@/lib/source";
-import { createFromSource } from "fumadocs-core/search/server";
+import { docs } from '@/lib/source';
+import { createFromSource } from 'fumadocs-core/search/server';
-export const { GET } = createFromSource(docs);
+export const { GET } = createFromSource(docs, {
+ language: 'english'
+});
diff --git a/apps/www/src/app/docs/[[...slug]]/page.module.css b/apps/www/src/app/docs/[[...slug]]/page.module.css
index eabd8b9c3..8d4514d70 100644
--- a/apps/www/src/app/docs/[[...slug]]/page.module.css
+++ b/apps/www/src/app/docs/[[...slug]]/page.module.css
@@ -1,16 +1,14 @@
-.title {
- display: flex;
- gap: 12px;
- align-items: center;
-}
-.actions {
- display: flex;
- align-items: center;
+.content {
+ max-width: 806px;
+ padding: var(--rs-space-15) var(--rs-space-7);
+ width: 100%;
}
-.container {
- display: flex;
- gap: 12px;
- align-items: center;
- justify-content: space-between;
+:global(.prose) {
+ gap: var(--rs-space-3);
+ color: var(--rs-color-foreground-base-secondary);
+ font-size: var(--rs-font-size-regular);
+ font-weight: var(--rs-font-weight-regular);
+ line-height: var(--rs-line-height-regular);
+ letter-spacing: var(--rs-letter-spacing-regular);
}
diff --git a/apps/www/src/app/docs/[[...slug]]/page.tsx b/apps/www/src/app/docs/[[...slug]]/page.tsx
index df2256354..8e4430085 100644
--- a/apps/www/src/app/docs/[[...slug]]/page.tsx
+++ b/apps/www/src/app/docs/[[...slug]]/page.tsx
@@ -1,61 +1,80 @@
-import { LLMCopyButton, ViewOptions } from '@/components/ai/page-actions';
-import Demo from '@/components/demo';
-import Tag from '@/components/tag';
+import DocsNavbar from '@/components/docs/navbar';
+import { mdxComponents } from '@/components/mdx';
+import TableOfContents from '@/components/toc/toc';
import { docs } from '@/lib/source';
-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
-import { TypeTable } from 'fumadocs-ui/components/type-table';
-import defaultMdxComponents from 'fumadocs-ui/mdx';
-import {
- DocsBody,
- DocsDescription,
- DocsPage,
- DocsTitle
-} from 'fumadocs-ui/page';
+import { Flex, Headline, Text } from '@raystack/apsara';
+import { createRelativeLink } from 'fumadocs-ui/mdx';
+import type { Metadata } from 'next';
import { notFound } from 'next/navigation';
import styles from './page.module.css';
-export default async function Page(props: {
- params: Promise<{ slug?: string[] }>;
-}) {
+export default async function Page(props: PageProps<'/docs/[[...slug]]'>) {
const params = await props.params;
const page = docs.getPage(params.slug);
if (!page) notFound();
const MDX = page.data.body;
+ console.log('page', page);
+
return (
-
-
-
-
- {page.data.title}
-
-
-
-
-
-
-
-
- {page.data.description}
-
-
+
+
+
+
+ {page.data.title}
+
+ {page.data.description}
+
+
+
+
+
+
+
+
-
-
+ >
+
+
+
+
);
}
@@ -63,9 +82,9 @@ export async function generateStaticParams() {
return docs.generateParams();
}
-export async function generateMetadata(props: {
- params: Promise<{ slug?: string[] }>;
-}) {
+export async function generateMetadata(
+ props: PageProps<'/docs/[[...slug]]'>
+): Promise {
const params = await props.params;
const page = docs.getPage(params.slug);
if (!page) notFound();
diff --git a/apps/www/src/app/docs/layout.module.css b/apps/www/src/app/docs/layout.module.css
new file mode 100644
index 000000000..946033346
--- /dev/null
+++ b/apps/www/src/app/docs/layout.module.css
@@ -0,0 +1,13 @@
+.container {
+ display: flex;
+ flex-direction: row;
+ position: relative;
+}
+.sidebar {
+ height: 100vh;
+ position: sticky;
+ top: 0;
+}
+.content {
+ flex: 1;
+}
diff --git a/apps/www/src/app/docs/layout.tsx b/apps/www/src/app/docs/layout.tsx
index 9f4e4da23..86e9b46a1 100644
--- a/apps/www/src/app/docs/layout.tsx
+++ b/apps/www/src/app/docs/layout.tsx
@@ -1,24 +1,14 @@
-import type { ReactNode } from "react";
-import { DocsLayout } from "fumadocs-ui/layouts/docs";
-import { docs } from "@/lib/source";
-import ThemeSwitcher from "@/components/theme-switcher";
-import { SidebarItem } from "@/components/docs/sidebar-item";
+import DocsSidebar from '@/components/docs/sidebar';
+import { docs } from '@/lib/source';
+import { Flex } from '@raystack/apsara';
+import type { ReactNode } from 'react';
+import styles from './layout.module.css';
export default function Layout({ children }: { children: ReactNode }) {
return (
- > }}
- disableThemeSwitch={true}
- sidebar={{
- collapsible: false,
- footer: ,
- hideSearch: true,
- components: {
- Item: SidebarItem,
- },
- }}>
- {children}
-
+
+
+ {children}
+
);
}
diff --git a/apps/www/src/app/icons/layout.tsx b/apps/www/src/app/icons/layout.tsx
deleted file mode 100644
index 3b7029687..000000000
--- a/apps/www/src/app/icons/layout.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-import { type ReactNode } from "react";
-
-export const metadata = {
- title: "Apsara Icons",
-};
-
-export default function Layout({ children }: { children: ReactNode }) {
- return children;
-}
diff --git a/apps/www/src/app/icons/page.module.css b/apps/www/src/app/icons/page.module.css
deleted file mode 100644
index e704a3da7..000000000
--- a/apps/www/src/app/icons/page.module.css
+++ /dev/null
@@ -1,82 +0,0 @@
-.container {
- position: relative;
- display: flex;
- min-height: 100vh;
- padding: 28px;
- gap: 40px;
-}
-
-.aside {
- position: sticky;
- top: 28px;
-}
-
-.main {
- display: flex;
- flex-direction: column;
- width: 100%;
- height: 100%;
- justify-content: center;
- align-items: center;
- padding-top: 20px;
- flex: 1;
-}
-.info {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- align-self: stretch;
- gap: 12px;
-}
-.info > * {
- margin: 0;
-}
-.content {
- display: flex;
- flex-direction: column;
- gap: 40px;
- max-width: 720px;
- width: 100%;
-}
-.controls {
- display: flex;
- justify-content: space-between;
- align-items: center;
-}
-.spacer {
- width: 100%;
- height: 100%;
-}
-.icons {
- display: flex;
- flex-wrap: wrap;
- gap: 24px;
- row-gap: 32px;
-}
-.icon {
- display: flex;
- gap: 8px;
- flex-direction: column;
- width: 100px;
- cursor: pointer;
-}
-.icon:hover .iconImage,
-.icon.active .iconImage {
- background-color: hsl(var(--fd-secondary) / 1);
-}
-.iconImage {
- aspect-ratio: 1 / 1;
- border: 1px solid hsl(var(--fd-border) / 1);
- background-color: hsl(var(--fd-popover) / 1);
- border-radius: 12px;
- justify-content: center;
- align-items: center;
- display: flex;
-}
-.iconText {
- font-size: 12px;
- color: hsl(var(--fd-foreground) / 1);
- text-align: center;
- overflow: auto;
- text-overflow: ellipsis;
-}
diff --git a/apps/www/src/app/icons/page.tsx b/apps/www/src/app/icons/page.tsx
deleted file mode 100644
index e0e3b544b..000000000
--- a/apps/www/src/app/icons/page.tsx
+++ /dev/null
@@ -1,80 +0,0 @@
-'use client';
-import IconDetails, { IconDetailsProps } from '@/components/icon-details';
-import IconEmpty from '@/components/icon-details/icon-empty';
-import { Search, Tabs } from '@raystack/apsara';
-import * as Icons from '@raystack/apsara/icons';
-import { cx } from 'class-variance-authority';
-import { useState } from 'react';
-import style from './page.module.css';
-
-type TabType = 'normal' | 'filled';
-
-const FILTERS: Record Boolean> = {
- normal: ([name]) => !name.includes('Filled'),
- filled: ([name]) => name.includes('Filled')
-};
-
-const Page = () => {
- const [tab, setTab] = useState('normal');
- const [search, setSearch] = useState('');
- const [icon, setIcon] = useState(null);
-
- return (
-
-
-
-
-
Apsara Icons
-
- A search input component with built-in search icon and optional
- clear button.
-
-
-
-
setTab(value as TabType)}>
-
- Normal
- Filled
-
-
-
-
setSearch(e.target.value)}
- onClear={() => setSearch('')}
- />
-
-
- {Object.entries(Icons)
- .filter(FILTERS[tab])
- .filter(([name]) =>
- name.toLowerCase().includes(search.toLowerCase())
- )
- .map(([name, Icon]) => (
-
setIcon({ name, icon: Icon })}
- >
-
-
-
-
{name}
-
- ))}
-
-
-
-
-
- );
-};
-
-export default Page;
diff --git a/apps/www/src/app/layout.module.css b/apps/www/src/app/layout.module.css
new file mode 100644
index 000000000..be77bad4c
--- /dev/null
+++ b/apps/www/src/app/layout.module.css
@@ -0,0 +1,6 @@
+.body {
+ display: flex;
+ flex-direction: column;
+ min-height: 100vh;
+ background: var(--rs-color-background-base-primary);
+}
diff --git a/apps/www/src/app/layout.tsx b/apps/www/src/app/layout.tsx
index 38f4f075d..067ff791d 100644
--- a/apps/www/src/app/layout.tsx
+++ b/apps/www/src/app/layout.tsx
@@ -1,34 +1,29 @@
-import { RootProvider } from "fumadocs-ui/provider";
-import { Inter } from "next/font/google";
-import type { ReactNode } from "react";
-import Navbar from "@/components/navbar";
-import "fumadocs-ui/style.css";
-import "@raystack/apsara/style.css";
-import "@/styles.css";
-import { ThemeProvider } from "@/components/theme";
+import { ThemeProvider } from '@/components/theme';
+import { NextProvider } from 'fumadocs-core/framework/next';
+import { Inter } from 'next/font/google';
+import type { ReactNode } from 'react';
+import '@/styles.css';
+import '@raystack/apsara/normalize.css';
+import '@raystack/apsara/style.css';
+import { ThemeProvider as NextThemeProvider } from 'next-themes';
+import styles from './layout.module.css';
const inter = Inter({
- subsets: ["latin"],
+ subsets: ['latin']
});
export default function Layout({ children }: { children: ReactNode }) {
return (
-
+
-
+
-
-
-
-
- {children}
-
-
+
+
+
+ {children}
+
+
);
diff --git a/apps/www/src/app/playground/layout.module.css b/apps/www/src/app/playground/layout.module.css
deleted file mode 100644
index b018de651..000000000
--- a/apps/www/src/app/playground/layout.module.css
+++ /dev/null
@@ -1,19 +0,0 @@
-.container {
- position: relative;
- display: flex;
- min-height: 100vh;
-}
-.aside {
- position: sticky;
- top: var(--fd-nav-height);
- padding: 28px;
- height: fit-content;
-}
-.main {
- flex: 1;
- padding: 28px;
- display: flex;
- gap: 40px;
- flex-direction: column;
- align-items: flex-start;
-}
diff --git a/apps/www/src/app/playground/layout.tsx b/apps/www/src/app/playground/layout.tsx
deleted file mode 100644
index 46fce2256..000000000
--- a/apps/www/src/app/playground/layout.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import { type ReactNode } from "react";
-import styles from "./layout.module.css";
-import ThemeCustomizer from "@/components/theme-customiser";
-
-export default function Layout({ children }: { children: ReactNode }) {
- return (
-
- );
-}
diff --git a/apps/www/src/app/playground/page.module.css b/apps/www/src/app/playground/page.module.css
deleted file mode 100644
index 3c8e69c99..000000000
--- a/apps/www/src/app/playground/page.module.css
+++ /dev/null
@@ -1,7 +0,0 @@
-.container {
- display: flex;
- width: 100%;
- gap: 100px;
- flex-direction: column;
- padding-bottom: 100px;
-}
diff --git a/apps/www/src/app/playground/page.tsx b/apps/www/src/app/playground/page.tsx
deleted file mode 100644
index 0f1e5c6b3..000000000
--- a/apps/www/src/app/playground/page.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-import * as Playground from '@/components/playground';
-import styles from './page.module.css';
-
-export const metadata = {
- title: 'Apsara Playground'
-};
-
-export default function Page() {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
-}
diff --git a/apps/www/src/assets/github.tsx b/apps/www/src/assets/github.tsx
new file mode 100644
index 000000000..bd5dd9696
--- /dev/null
+++ b/apps/www/src/assets/github.tsx
@@ -0,0 +1,22 @@
+import { FC, SVGProps } from 'react';
+
+export const GitHubIcon: FC> = ({
+ width = 24,
+ height = 24,
+ ...props
+}) => {
+ return (
+
+ );
+};
+
+export default GitHubIcon;
diff --git a/apps/www/src/components/demo/demo-controls.tsx b/apps/www/src/components/demo/demo-controls.tsx
index 4aadc1ea0..19287edc2 100644
--- a/apps/www/src/components/demo/demo-controls.tsx
+++ b/apps/www/src/components/demo/demo-controls.tsx
@@ -1,11 +1,26 @@
-import { Info, Home, Laugh, X, Ban } from "lucide-react";
-import styles from "./styles.module.css";
+import { camelCaseToWords } from '@/lib/utils';
+import {
+ InfoCircledIcon,
+ Pencil2Icon,
+ PlusIcon,
+ TransformIcon,
+ UploadIcon
+} from '@radix-ui/react-icons';
+import {
+ Flex,
+ IconButton,
+ InputField,
+ Select,
+ Switch,
+ Text
+} from '@raystack/apsara';
+import { cx } from 'class-variance-authority';
+import styles from './styles.module.css';
import {
ComponentPropsType,
ControlsType,
- PropChangeHandlerType,
-} from "./types";
-import { cx } from "class-variance-authority";
+ PropChangeHandlerType
+} from './types';
type PropControlsProps = {
controls: ControlsType;
@@ -14,84 +29,141 @@ type PropControlsProps = {
};
const ICONS_MAP = {
- none: { icon: , value: "" },
- info: { icon: , value: "" },
- close: { icon: , value: "" },
- home: { icon: , value: "" },
- laugh: { icon: , value: "" },
+ plus: { icon: , value: '' },
+ transform: { icon: , value: '' },
+ pencil: { icon: , value: '' },
+ info: { icon: , value: '' },
+ upload: { icon: , value: '' }
};
+
export default function DemoControls({
controls,
componentProps,
- onPropChange,
+ onPropChange
}: PropControlsProps) {
return (
-