Skip to content

fix(types): input prefix prop types #2880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions types/input/input-search.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,23 @@
// Definitions by: akki-jat <https://github.com/akki-jat>
// Definitions: https://github.com/vueComponent/ant-design-vue/types

import { AntdComponent, AntdProps } from '../component';
import { AntdComponent } from '../component';
import { VNodeChild } from 'vue';
import { InputProps } from './input';

export declare class InputSearch extends AntdComponent {
$props: AntdProps &
InputProps & {
/**
* to show an enter button after input
* @default false
* @type any (boolean | slot)
*/
enterButton?: boolean | VNodeChild | JSX.Element;
$props: InputProps & {
/**
* to show an enter button after input
* @default false
* @type any (boolean | slot)
*/
enterButton?: boolean | VNodeChild | JSX.Element;

/**
* Callback when search is clicked or enter is pressed
* @type Function
*/
onSearch?: (value: string | number, event: Event) => void;
};
/**
* Callback when search is clicked or enter is pressed
* @type Function
*/
onSearch?: (value: string | number, event: Event) => void;
};
}
4 changes: 2 additions & 2 deletions types/input/input.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { TextArea } from './textarea';
import { Password } from './password';
import { VNodeChild } from 'vue';

export type InputProps = {
export type InputProps = Omit<AntdProps, 'prefix'> & {
/**
* The label text displayed after (on the right side of) the input field.
* @type any (string | slot)
Expand Down Expand Up @@ -83,5 +83,5 @@ export declare class Input extends AntdComponent {
static Search: typeof InputSearch;
static TextArea: typeof TextArea;
static Password: typeof Password;
$props: AntdProps & InputProps;
$props: InputProps;
}
17 changes: 8 additions & 9 deletions types/input/password.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
// Definitions by: akki-jat <https://github.com/akki-jat>
// Definitions: https://github.com/vueComponent/ant-design-vue/types

import { AntdComponent, AntdProps } from '../component';
import { AntdComponent } from '../component';
import { InputProps } from './input';

export declare class Password extends AntdComponent {
$props: AntdProps &
Omit<InputProps, 'type' | 'suffix'> & {
/**
* Whether show toggle button
* @default true
*/
visibilityToggle?: boolean;
};
$props: Omit<InputProps, 'type' | 'suffix'> & {
/**
* Whether show toggle button
* @default true
*/
visibilityToggle?: boolean;
};
}