stream-chat-react
Version:
React components to create chat conversations or livestream style chat
34 lines • 1.83 kB
TypeScript
import type { ComponentProps, MouseEventHandler, PropsWithChildren, ReactNode } from 'react';
import React from 'react';
export type SwitchFieldProps = Omit<PropsWithChildren<ComponentProps<'input'>>, 'children'> & {
/** Main label content when title/description are not used */
children?: ReactNode;
/** Optional description line below title */
description?: string;
/** Class applied to the root div element of the SwitchField component */
fieldClassName?: string;
/** Optional title line */
title?: string;
};
export declare const SwitchField: ({ children, description, fieldClassName, title, ...props }: SwitchFieldProps) => import("react/jsx-runtime").JSX.Element;
export type SwitchProps = Omit<ComponentProps<'input'>, 'type'> & {
on?: boolean;
onSwitchClick?: MouseEventHandler<HTMLDivElement>;
switchRef?: React.RefObject<HTMLInputElement | null>;
};
export type SwitchFieldLabelProps = ComponentProps<'label'> & {
/** Adds className str-chat__form__switch-field__label--as-error to the root */
asError?: boolean;
title?: string;
description?: string;
};
export declare const SwitchFieldLabel: ({ asError, children, className, description, title, ...props }: SwitchFieldLabelProps) => import("react/jsx-runtime").JSX.Element;
export type SwitchFieldTitleProps = ComponentProps<'div'> & {
title?: string;
};
export declare const SwitchFieldTitle: ({ children, className, title, ...props }: SwitchFieldTitleProps) => import("react/jsx-runtime").JSX.Element;
export type SwitchFieldDescriptionProps = ComponentProps<'div'> & {
description?: string;
};
export declare const SwitchFieldDescription: ({ children, className, description, ...props }: SwitchFieldDescriptionProps) => import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=SwitchField.d.ts.map