Skip to content

Instantly share code, notes, and snippets.

@twobit
Created August 17, 2017 05:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twobit/cfb7f159b4419d3900b5063da1c4c2f2 to your computer and use it in GitHub Desktop.
Save twobit/cfb7f159b4419d3900b5063da1c4c2f2 to your computer and use it in GitHub Desktop.
react-input-autosize typescript declaration
// Type definitions for react-input-autosize 1.1
// Project: https://github.com/JedWatson/react-input-autosize
// Definitions by: Stephen Murphy <https://github.com/twobit>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="react"/>
import * as React from 'react';
interface AutosizeInputProps extends React.HTMLAttributes<HTMLInputElement> {
/** className for the outer element */
className?: string;
/** default field value */
defaultValue?: string;
/** className for the input element */
inputClassName?: string;
/** css styles for the input element */
inputStyle?: object;
/** minimum width for input element */
minWidth?: number | string;
/** onAutosize handler */
onAutosize?: (newWidth: number) => void;
/** placeholder text */
placeholder?: string;
/** don't collapse size to less than the placeholder */
placeholderIsMinWidth?: boolean;
/** css styles for the outer element */
style?: object;
value?: string;
}
export default class AutosizeInput extends React.Component<AutosizeInputProps> {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment