UNPKG

react-odyssey

Version:

React components for Odyssey design system

35 lines (34 loc) 1.92 kB
import React, { FieldsetHTMLAttributes, FunctionComponent, HTMLAttributes, InputHTMLAttributes, ReactNode, RefForwardingComponent, SelectHTMLAttributes, TextareaHTMLAttributes, LabelHTMLAttributes } from 'react'; export declare const FormTitle: FunctionComponent<HTMLAttributes<HTMLHeadingElement>>; export declare const FormHeader: FunctionComponent<HTMLAttributes<HTMLElement>>; export declare const FormHeaderWithTitle: FunctionComponent<HTMLAttributes<HTMLElement>>; export declare const FormActions: FunctionComponent<HTMLAttributes<HTMLElement>>; export declare const FormFooter: FunctionComponent<HTMLAttributes<HTMLElement>>; export interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> { optional?: boolean; } export declare const Label: FunctionComponent<LabelProps>; declare type OurFieldSetProps = { aside?: ReactNode; error?: ReactNode; htmlFor?: string; label?: ReactNode; legend?: ReactNode; }; export declare type FieldSetProps = FieldsetHTMLAttributes<HTMLFieldSetElement> & OurFieldSetProps; export declare const FieldSet: FunctionComponent<FieldSetProps>; export declare type InputProps = InputHTMLAttributes<HTMLInputElement> & OurFieldSetProps & { ref?: React.Ref<HTMLInputElement>; }; export declare const CheckBox: RefForwardingComponent<HTMLInputElement, InputProps>; export declare const TextInput: React.ComponentType<InputProps>; export declare const PasswordInput: React.ComponentType<InputProps>; export declare type SelectProps = SelectHTMLAttributes<HTMLSelectElement> & OurFieldSetProps & { ref?: React.Ref<HTMLSelectElement>; }; export declare const Select: React.ComponentType<SelectProps>; export declare type TextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement> & OurFieldSetProps & { ref?: React.Ref<HTMLTextAreaElement>; }; export declare const TextArea: RefForwardingComponent<HTMLTextAreaElement, TextAreaProps>; export {};