Skip to content

Commit

Permalink
Change type of event handler props at website
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian-hiller committed Nov 23, 2022
1 parent ea7f084 commit 01e78ad
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions packages/website/src/components/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ type CheckboxProps = {
name: string;
value?: string;
checked?: boolean;
onInput: JSX.EventHandlerUnion<HTMLInputElement, InputEvent>;
onChange: JSX.EventHandlerUnion<HTMLInputElement, Event>;
onBlur: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>;
onInput: JSX.EventHandler<HTMLInputElement, InputEvent>;
onChange: JSX.EventHandler<HTMLInputElement, Event>;
onBlur: JSX.EventHandler<HTMLInputElement, FocusEvent>;
required?: boolean;
class?: string;
label: string;
Expand Down
6 changes: 3 additions & 3 deletions packages/website/src/components/FileInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ type FileInputProps = {
ref: (element: HTMLInputElement) => void;
name: string;
value?: FileList | File;
onInput: JSX.EventHandlerUnion<HTMLInputElement, InputEvent>;
onChange: JSX.EventHandlerUnion<HTMLInputElement, Event>;
onBlur: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>;
onInput: JSX.EventHandler<HTMLInputElement, InputEvent>;
onChange: JSX.EventHandler<HTMLInputElement, Event>;
onBlur: JSX.EventHandler<HTMLInputElement, FocusEvent>;
accept?: string;
required?: boolean;
multiple?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion packages/website/src/components/Hamburger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { For, JSX } from 'solid-js';

type HamburgerProps = {
active: boolean;
onClick: JSX.EventHandlerUnion<HTMLButtonElement, MouseEvent>;
onClick: JSX.EventHandler<HTMLButtonElement, MouseEvent>;
};

/**
Expand Down
6 changes: 3 additions & 3 deletions packages/website/src/components/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ type SelectProps = {
ref: (element: HTMLSelectElement) => void;
name: string;
value: string | string[] | undefined;
onInput: JSX.EventHandlerUnion<HTMLSelectElement, InputEvent>;
onChange: JSX.EventHandlerUnion<HTMLSelectElement, Event>;
onBlur: JSX.EventHandlerUnion<HTMLSelectElement, FocusEvent>;
onInput: JSX.EventHandler<HTMLSelectElement, InputEvent>;
onChange: JSX.EventHandler<HTMLSelectElement, Event>;
onBlur: JSX.EventHandler<HTMLSelectElement, FocusEvent>;
options: { label: string; value: string }[];
multiple?: boolean;
size?: string | number;
Expand Down
6 changes: 3 additions & 3 deletions packages/website/src/components/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ type SliderProps = {
ref: (element: HTMLInputElement) => void;
name: string;
value?: number;
onInput: JSX.EventHandlerUnion<HTMLInputElement, InputEvent>;
onChange: JSX.EventHandlerUnion<HTMLInputElement, Event>;
onBlur: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>;
onInput: JSX.EventHandler<HTMLInputElement, InputEvent>;
onChange: JSX.EventHandler<HTMLInputElement, Event>;
onBlur: JSX.EventHandler<HTMLInputElement, FocusEvent>;
min?: number;
max?: number;
step?: number;
Expand Down
6 changes: 3 additions & 3 deletions packages/website/src/components/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ type TextInputProps = {
type: 'text' | 'email' | 'tel' | 'password' | 'url' | 'number' | 'date';
name: string;
value: string | number | undefined;
onInput: JSX.EventHandlerUnion<HTMLInputElement, InputEvent>;
onChange: JSX.EventHandlerUnion<HTMLInputElement, Event>;
onBlur: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>;
onInput: JSX.EventHandler<HTMLInputElement, InputEvent>;
onChange: JSX.EventHandler<HTMLInputElement, Event>;
onBlur: JSX.EventHandler<HTMLInputElement, FocusEvent>;
placeholder?: string;
required?: boolean;
class?: string;
Expand Down
12 changes: 6 additions & 6 deletions packages/website/src/routes/guides/input-components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ type TextInputProps = {
type: 'text' | 'email' | 'tel' | 'password' | 'url' | 'number' | 'date';
name: string;
value: string | number | undefined;
onInput: JSX.EventHandlerUnion<HTMLInputElement, InputEvent>;
onChange: JSX.EventHandlerUnion<HTMLInputElement, Event>;
onBlur: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>;
onInput: JSX.EventHandler<HTMLInputElement, InputEvent>;
onChange: JSX.EventHandler<HTMLInputElement, Event>;
onBlur: JSX.EventHandler<HTMLInputElement, FocusEvent>;
placeholder?: string;
required?: boolean;
label?: string;
Expand Down Expand Up @@ -135,9 +135,9 @@ type TextInputProps = {
type: 'text' | 'email' | 'tel' | 'password' | 'url' | 'number' | 'date';
name: string;
value: string | number | undefined;
onInput: JSX.EventHandlerUnion<HTMLInputElement, InputEvent>;
onChange: JSX.EventHandlerUnion<HTMLInputElement, Event>;
onBlur: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>;
onInput: JSX.EventHandler<HTMLInputElement, InputEvent>;
onChange: JSX.EventHandler<HTMLInputElement, Event>;
onBlur: JSX.EventHandler<HTMLInputElement, FocusEvent>;
placeholder?: string;
required?: boolean;
label?: string;
Expand Down

0 comments on commit 01e78ad

Please sign in to comment.