feat: add onboarding with oldmarr import (#1606)
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": "./index.ts"
|
||||
".": "./index.ts",
|
||||
"./types": "./src/types.ts"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
@@ -22,6 +23,7 @@
|
||||
},
|
||||
"prettier": "@homarr/prettier-config",
|
||||
"dependencies": {
|
||||
"@homarr/common": "workspace:^0.1.0",
|
||||
"@homarr/translation": "workspace:^0.1.0",
|
||||
"@homarr/validation": "workspace:^0.1.0",
|
||||
"@mantine/form": "^7.15.1"
|
||||
|
||||
21
packages/form/src/types.ts
Normal file
21
packages/form/src/types.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { ChangeEvent, FocusEvent } from "react";
|
||||
|
||||
export interface InputPropsFor<T, TOnChangeArg, TComponent extends HTMLElement = HTMLInputElement>
|
||||
extends BasePropsFor<TOnChangeArg, TComponent> {
|
||||
value?: T;
|
||||
defaultValue?: T;
|
||||
}
|
||||
|
||||
interface BasePropsFor<TOnChangeArg, TComponent extends HTMLElement> {
|
||||
onChange: (value: TOnChangeArg) => void;
|
||||
error?: string;
|
||||
onBlur?: (event: FocusEvent<TComponent>) => void;
|
||||
onFocus?: (event: FocusEvent<TComponent>) => void;
|
||||
}
|
||||
|
||||
export interface CheckboxProps<
|
||||
TOnChangeArg = ChangeEvent<HTMLInputElement>,
|
||||
TComponent extends HTMLElement = HTMLInputElement,
|
||||
> extends BasePropsFor<TOnChangeArg, TComponent> {
|
||||
checked?: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user