Skip to content
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
2 changes: 1 addition & 1 deletion content/docs/components/basic/pagination.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@ interface PaginationSchema {
totalItems?: number; // Total number of items

// Events
onPageChange?: string | ActionConfig;
onPageChange?: (page: number) => void;

// Styling
className?: string;
Expand Down
2 changes: 1 addition & 1 deletion content/docs/components/disclosure/toggle-group.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,7 +38,7 @@ interface ToggleGroupSchema {
size?: 'sm' | 'default' | 'lg';

// Events
onValueChange?: string | ActionConfig;
onValueChange?: (value: string | string[]) => void;

// States
disabled?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions content/docs/components/feedback/sonner.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -28,10 +28,10 @@ The Sonner component provides beautiful toast notifications with a rich API.

```plaintext
interface SonnerSchema {
action: 'sonner';
type: 'sonner';
message: string; // Toast message
description?: string; // Additional description
type?: 'default' | 'success' | 'error' | 'warning' | 'info';
variant?: 'default' | 'success' | 'error' | 'warning' | 'info';
duration?: number; // Auto-close duration (ms)

// Action
Expand Down
2 changes: 1 addition & 1 deletion content/docs/components/form/button.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -61,7 +61,7 @@ interface ButtonSchema {
loading?: boolean;

// Actions
onClick?: string | ActionConfig; // Action on click
onClick?: () => void | Promise<void>; // Click handler
href?: string; // Link URL (renders as link)

// Styling
Expand Down
2 changes: 1 addition & 1 deletion content/docs/components/form/form.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,7 +47,7 @@ interface FormSchema {
};

// Events
onSubmit?: string | ActionConfig;
onSubmit?: (data: Record<string, any>) => void | Promise<void>;

// Layout
columns?: number; // Grid layout
Expand Down
4 changes: 2 additions & 2 deletions content/docs/components/form/input-otp.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,8 +32,8 @@ interface InputOTPSchema {
separator?: boolean; // Show visual separator

// Events
onChange?: string | ActionConfig;
onComplete?: string | ActionConfig;
onChange?: (value: string) => void;
onComplete?: (value: string) => void;

// States
disabled?: boolean;
Expand Down
13 changes: 10 additions & 3 deletions content/docs/plugins/plugin-dashboard.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -329,12 +329,19 @@ from widget `options`. In particular, on a dataset-bound gauge:
## TypeScript Support

```plaintext
import type { DashboardSchema, MetricCardSchema } from '@object-ui/plugin-dashboard';
import type { DashboardComponentSchema, DashboardWidgetSchema } from '@object-ui/types';

const dashboard: DashboardSchema = {
const widget: DashboardWidgetSchema = {
id: 'revenue',
title: 'Revenue',
type: 'metric-card',
layout: { x: 0, y: 0, w: 1, h: 1 },
};

const dashboard: DashboardComponentSchema = {
type: 'dashboard',
columns: 3,
widgets: [...]
widgets: [widget],
};
```

Expand Down