Newer
Older
CrypticOreWallet / src / components / auth / MasterPasswordInput.tsx
@Drew Lemmy Drew Lemmy on 15 Feb 2021 481 bytes feat: initial work on wallet dialogs
import React from "react";
import { Input } from "antd";

interface Props {
  inputRef?: React.Ref<Input>;
  placeholder: string;
  tabIndex?: number;
  autoFocus?: boolean;
}

export function getMasterPasswordInput({ inputRef, placeholder, tabIndex, autoFocus }: Props): JSX.Element {
  return <Input
    type="password"
    placeholder={placeholder}
    autoComplete="off"
    tabIndex={tabIndex !== undefined ? tabIndex : 1}
    autoFocus={autoFocus}
    ref={inputRef}
  />;
}