Created
August 17, 2017 05:26
-
-
Save twobit/cfb7f159b4419d3900b5063da1c4c2f2 to your computer and use it in GitHub Desktop.
react-input-autosize typescript declaration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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