1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00

(type) fix typing issues

This commit is contained in:
Sylvain 2022-03-30 16:44:45 +02:00
parent 7de8686bd8
commit f83dc52610
2 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,6 @@
import React, { ReactNode } from 'react'; import React, { ReactNode } from 'react';
import { FieldErrors, UseFormRegister, Validate } from 'react-hook-form'; import { FieldErrors, UseFormRegister, Validate } from 'react-hook-form';
import { FieldValues } from 'react-hook-form/dist/types/fields';
type inputType = string|number|readonly string []; type inputType = string|number|readonly string [];
type ruleTypes = { type ruleTypes = {
@ -9,12 +10,12 @@ type ruleTypes = {
maxLenght?: number, maxLenght?: number,
min?: number, min?: number,
max?: number, max?: number,
validate?: Validate<any>; validate?: Validate<FieldValues>;
}; };
interface RHFInputProps { interface RHFInputProps {
id: string, id: string,
register: UseFormRegister<any>, register: UseFormRegister<FieldValues>,
label?: string, label?: string,
tooltip?: string, tooltip?: string,
defaultValue?: inputType, defaultValue?: inputType,

View File

@ -3,7 +3,7 @@ import { Node } from '@tiptap/core';
export interface IframeOptions { export interface IframeOptions {
allowFullscreen: boolean, allowFullscreen: boolean,
HTMLAttributes: { HTMLAttributes: {
[key: string]: any [key: string]: string
}, },
} }