obsidian-dev-utils
Version:
This is the collection of useful functions that you can use for your Obsidian plugin development
38 lines (37 loc) • 1.21 kB
text/typescript
/**
* @packageDocumentation
*
* Contains a component that allows the user to enter a password.
*/
import { TypedTextComponent } from './TypedTextComponent.mjs';
/**
* A component that allows the user to enter a password.
*
* You can add this component using {@link SettingEx.addPassword}.
*
* In order to add the styles for the component, use {@link initPluginContext} in your plugin's `onload()` function.
*
* Alternatively, you can copy styles from {@link https://github.com/mnaoumov/obsidian-dev-utils/releases/latest/download/styles.css}.
*/
export declare class PasswordComponent extends TypedTextComponent<string> {
/**
* Creates a new password component.
*
* @param container - The container element of the component.
*/
constructor(container: HTMLElement);
/**
* Sets the placeholder value of the component.
*
* @param placeholder - The placeholder to set.
* @returns The component.
*/
setPlaceholder(placeholder: string): this;
/**
* Gets the value from a string.
*
* @param str - The string to get the value from.
* @returns The value from the string.
*/
valueFromString(str: string): string;
}