mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Enforce some naming conventions (#4813)
This commit is contained in:
1 parent
dc6615f98f
commit
0b32775d40
197 files changed
+630
-634
No files matched your search
@@ -11,7 +11,7 @@ export interface FileInputSelection<T = string> {
|
||||
error?: string;
|
||||
}
|
||||
|
||||
interface Props extends InputHTMLAttributes<any> {
|
||||
export interface FileInputProps extends InputHTMLAttributes<any> {
|
||||
id?: string; // could be used with <label htmlFor={id}/> to open filesystem dialog
|
||||
accept?: string; // allowed file types to select, e.g. "application/json"
|
||||
readAsText?: boolean; // provide files content as text in selection-callback
|
||||
@@ -19,7 +19,7 @@ interface Props extends InputHTMLAttributes<any> {
|
||||
onSelectFiles(...selectedFiles: FileInputSelection[]): void;
|
||||
}
|
||||
|
||||
export class FileInput extends React.Component<Props> {
|
||||
export class FileInput extends React.Component<FileInputProps> {
|
||||
protected input: HTMLInputElement;
|
||||
|
||||
protected style: React.CSSProperties = {
|
||||
|
||||
@@ -22,7 +22,7 @@ export { InputValidators };
|
||||
export type { InputValidator };
|
||||
|
||||
type InputElement = HTMLInputElement | HTMLTextAreaElement;
|
||||
type InputElementProps = InputHTMLAttributes<InputElement> & TextareaHTMLAttributes<InputElement> & DOMAttributes<InputElement>;
|
||||
type InputElementProps = InputHTMLAttributes<HTMLInputElement> & TextareaHTMLAttributes<HTMLTextAreaElement> & DOMAttributes<InputElement>;
|
||||
|
||||
export interface IconDataFnArg {
|
||||
isDirty: boolean;
|
||||
|
||||
@@ -12,14 +12,14 @@ import { Icon } from "../icon";
|
||||
import { Input, InputProps } from "./input";
|
||||
import { isMac } from "../../../common/vars";
|
||||
|
||||
interface Props extends InputProps {
|
||||
export interface SearchInputProps extends InputProps {
|
||||
compact?: boolean; // show only search-icon when not focused
|
||||
bindGlobalFocusHotkey?: boolean;
|
||||
showClearIcon?: boolean;
|
||||
onClear?(): void;
|
||||
}
|
||||
|
||||
const defaultProps: Partial<Props> = {
|
||||
const defaultProps: Partial<SearchInputProps> = {
|
||||
autoFocus: true,
|
||||
bindGlobalFocusHotkey: true,
|
||||
showClearIcon: true,
|
||||
@@ -27,7 +27,7 @@ const defaultProps: Partial<Props> = {
|
||||
};
|
||||
|
||||
@observer
|
||||
export class SearchInput extends React.Component<Props> {
|
||||
export class SearchInput extends React.Component<SearchInputProps> {
|
||||
static defaultProps = defaultProps as object;
|
||||
|
||||
private inputRef = createRef<Input>();
|
||||
|
||||
Reference in new issue
Block a user