antd/lib/input#PasswordProps TypeScript Examples
The following examples show how to use
antd/lib/input#PasswordProps.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: registerInput.ts From plasmic with MIT License | 5 votes |
export function registerInputPassword(
loader?: Registerable,
customInputPasswordMeta?: ComponentMeta<PasswordProps>
) {
const doRegisterComponent: typeof registerComponent = (...args) =>
loader ? loader.registerComponent(...args) : registerComponent(...args);
doRegisterComponent(Password, customInputPasswordMeta ?? inputPasswordMeta);
}
Example #2
Source File: registerInput.ts From plasmic with MIT License | 5 votes |
inputPasswordMeta: ComponentMeta<PasswordProps> = {
name: "AntdInputPassword",
displayName: "Antd Input Password",
props: sortProps<PasswordProps>({
...commonHtmlAttributes,
addonAfter: {
type: "slot",
hidePlaceholder: true,
},
addonBefore: {
type: "slot",
hidePlaceholder: true,
},
allowClear: {
type: "boolean",
description: "If allow to remove input content with clear icon",
defaultValueHint: false,
},
bordered: {
type: "boolean",
description: "Whether has border style",
defaultValueHint: true,
},
disabled: {
type: "boolean",
description: "Whether the input is disabled",
defaultValueHint: false,
},
id: {
type: "string",
description: "The ID for input",
},
maxLength: {
type: "number",
description: "The max length",
},
placeholder: {
type: "string",
description: "Placeholder for the input",
},
prefix: {
type: "slot",
hidePlaceholder: true,
},
size: {
type: "choice",
options: ["small", "middle", "large"],
description: "The size of the input box",
defaultValueHint: "middle",
},
type: {
type: "string",
description: "The type of input",
},
value: {
type: "string",
editOnly: true,
uncontrolledProp: "defaultValue",
},
visibilityToggle: {
type: "boolean",
description: "Whether show toggle button",
defaultValueHint: true,
},
}),
importPath: "antd/lib/input/Password",
importName: "Password",
isDefaultExport: true,
parentComponentName: "AntdInput",
}