UNPKG

nudge-components-library

Version:

A library of nudge UI components

30 lines 1.17 kB
import React from "react"; import "../../styles/tokens.css"; import "../../styles/globals.css"; type CommonTextBoxProps = { textBoxLabel?: string; placeholder?: string; onChange?: (value: string) => void; disabled?: boolean; nudgeText?: string; id?: string; ariaLabel?: string; onFocus?: React.FocusEventHandler<HTMLInputElement>; onBlur?: React.FocusEventHandler<HTMLInputElement>; onCommit?: (value: string) => void; nudgeVisible?: boolean; nudgePosition?: "top" | "bottom" | "left" | "right"; renderNudge?: (value: string) => React.ReactNode; }; type ControlledTextBoxProps = { value: string; defaultValue?: never; }; type UncontrolledTextBoxProps = { defaultValue: string; value?: never; }; export type TextBoxProps = (ControlledTextBoxProps | UncontrolledTextBoxProps) & CommonTextBoxProps; export declare function TextBox({ textBoxLabel, placeholder, value, defaultValue, onChange, disabled, nudgeText, id, ariaLabel, onFocus, onBlur, onCommit, nudgeVisible, nudgePosition, renderNudge, }: TextBoxProps): import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=TextBox.d.ts.map