UNPKG

react-antd-admin-panel

Version:

Modern TypeScript-first React admin panel builder with Ant Design 6

35 lines 996 B
import React from 'react'; import { FormFieldBuilder, FormFieldBuilderConfig } from '../base/FormFieldBuilder'; export interface SwitchConfig extends FormFieldBuilderConfig { checkedChildren?: React.ReactNode; unCheckedChildren?: React.ReactNode; size?: 'default' | 'small'; loading?: boolean; } /** * Switch Field Builder * Wrapper for Ant Design Switch component (toggle/boolean input) */ export declare class Switch extends FormFieldBuilder<SwitchConfig, boolean> { /** * Set content to display when checked */ checkedChildren(content: React.ReactNode): this; /** * Set content to display when unchecked */ unCheckedChildren(content: React.ReactNode): this; /** * Set switch size */ size(value: 'default' | 'small'): this; /** * Set loading state */ loading(value?: boolean): this; /** * Render the switch component */ render(): React.ReactNode; } //# sourceMappingURL=Switch.d.ts.map