From 53b7b1925e9b7ab7d66934fff6744c3478833eac Mon Sep 17 00:00:00 2001 From: Matthias Ngeo Date: Tue, 25 Jun 2024 23:22:28 +0800 Subject: [PATCH] Fix documentation (#55) --- docs/.env.development | 2 +- docs/components/widget.tsx | 9 +- docs/pages/docs/dialog.mdx | 2 +- docs/pages/docs/scaffold.mdx | 2 +- docs/pages/docs/separator.mdx | 6 +- docs/pages/docs/switch.mdx | 4 +- docs/pages/docs/tabs.mdx | 2 +- forui/lib/src/widgets/header/header.dart | 2 +- forui/lib/src/widgets/switch.dart | 5 +- samples/lib/sample_scaffold.dart | 21 +++-- samples/lib/widgets/scaffold.dart | 86 ++++++++++-------- samples/lib/widgets/separator.dart | 78 ++++++++-------- samples/lib/widgets/switch.dart | 6 +- samples/lib/widgets/tabs.dart | 111 ++++++++++++----------- samples/lib/widgets/text_field.dart | 51 +++++++---- 15 files changed, 212 insertions(+), 175 deletions(-) diff --git a/docs/.env.development b/docs/.env.development index e348e032b..5678937ad 100644 --- a/docs/.env.development +++ b/docs/.env.development @@ -1 +1 @@ -NEXT_PUBLIC_DEMO_URL=https://demo.master.forui.dev/card \ No newline at end of file +NEXT_PUBLIC_DEMO_URL=https://dev.demo.forui.dev \ No newline at end of file diff --git a/docs/components/widget.tsx b/docs/components/widget.tsx index 667bc5b09..3048f588f 100644 --- a/docs/components/widget.tsx +++ b/docs/components/widget.tsx @@ -3,20 +3,21 @@ import {useTheme} from "nextra-theme-docs"; interface Props { name: string; variant?: string; + height?: number; query: Record; } -export function Widget({name, variant = 'default', query}: Props) { +export function Widget({name, variant = 'default', height = 200, query}: Props) { const {resolvedTheme} = useTheme(); - query['theme'] = resolvedTheme; + query['theme'] = `zinc-${resolvedTheme}`; const url = process.env['NEXT_PUBLIC_DEMO_URL']; return (