ink-text-input
Advanced tools
Comparing version 3.2.0 to 3.2.1
import * as React from 'react'; | ||
export type InkTextInputProps = { | ||
interface CommonProps { | ||
/** | ||
* Value to display in a text input. | ||
*/ | ||
value: string; | ||
/** | ||
* Text to display when `value` is empty. | ||
@@ -36,12 +31,28 @@ */ | ||
/** | ||
* Function to call when `Enter` is pressed, where first argument is a value of the input. | ||
*/ | ||
onSubmit?: (value: string) => void; | ||
} | ||
export interface InkTextInputProps extends CommonProps { | ||
/** | ||
* Value to display in a text input. | ||
*/ | ||
value: string; | ||
/** | ||
* Function to call when value updates. | ||
*/ | ||
onChange: (value: string) => void; | ||
} | ||
export interface InkUncontrolledTextInputProps extends CommonProps { | ||
/** | ||
* Function to call when `Enter` is pressed, where first argument is a value of the input. | ||
*/ | ||
onSubmit?: (value: string) => void; | ||
}; | ||
onSubmit: (value: string) => void; | ||
} | ||
export default class InkTextInput extends React.Component<InkTextInputProps> {} | ||
export class UncontrolledTextInput extends React.Component<InkUncontrolledTextInputProps> {} |
{ | ||
"name": "ink-text-input", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"description": "Text input component for Ink", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -74,3 +74,3 @@ # ink-text-input [![Build Status](https://travis-ci.org/vadimdemedes/ink-text-input.svg?branch=master)](https://travis-ci.org/vadimdemedes/ink-text-input) | ||
Type: `boolean`<br> | ||
Default: `false` | ||
Default: `true` | ||
@@ -77,0 +77,0 @@ Whether to show cursor and allow navigation inside text input with arrow keys. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12986
247