Skip to content

Commit

Permalink
Fixing demo
Browse files Browse the repository at this point in the history
  • Loading branch information
OsamaAbdellateef committed Jul 18, 2023
1 parent bb03b9a commit 36d907f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion docs/registry/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
import dynamic from 'next/dynamic';

interface Registery {
[key: string]: any;
[key: string]: {
name: string;
demo: any;
file: string;
};
}

export const registry: Registery = {
Expand Down
2 changes: 1 addition & 1 deletion docs/ui/ComponentDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface ComponentDemoProps {
}

export const ComponentDemo = ({ name, children }: ComponentDemoProps) => {
const Demo = registry[name];
const Demo = registry[name].demo;
const { current, themes } = useThemeSwitch();
const [showCode, setShowCode] = useState(true);
const buttonStyles =
Expand Down

0 comments on commit 36d907f

Please sign in to comment.