Skip to content

Commit fc17859

Browse files
committed
Revert "style: better types"
This reverts commit b5ce9ae.
1 parent 3542092 commit fc17859

File tree

7 files changed

+8
-15
lines changed

7 files changed

+8
-15
lines changed

packages/forms/components/WebForms.astro

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
import {asyncContext} from '@astro-utils/context';
33
import {createFormToken} from '../dist/form-tools/csrf.js';
44
import {FORM_OPTIONS} from '../dist/settings.js';
5-
import type { HTMLAttributes } from 'astro/types';
65
7-
export interface Props extends HTMLAttributes<'form'> {
6+
export interface Props extends astroHTML.JSX.FormHTMLAttributes {
87
}
98
109
const context = {

packages/forms/components/form/BButton.astro

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
import getContext from '@astro-utils/context';
33
import {createUniqueContinuanceName} from '../../dist/form-tools/connectId.js';
44
import {isPost, validateAction} from '../../dist/form-tools/post.js';
5-
import type { HTMLAttributes } from 'astro/types';
65
7-
export interface Props<T extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>> extends HTMLAttributes<'button'> {
6+
export interface Props<T extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>> extends astroHTML.JSX.ButtonHTMLAttributes {
87
onClick: Function;
98
connectId?: string;
109
whenFormOK?: boolean;

packages/forms/components/form/BInput.astro

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ import getContext from '@astro-utils/context';
33
import {caseTypes, inputReturnValueAttr, validateFormInput} from '../../dist/components/input-parse.js';
44
import {validatePostRequest} from '../../dist/form-tools/post.js';
55
import {ModifyDeep} from '../../dist/utils.js';
6-
import type { HTMLAttributes } from 'astro/types';
76
8-
type inputTypes = HTMLAttributes<'input'>['type'] | 'int';
7+
type inputTypes = astroHTML.JSX.InputHTMLAttributes['type'] | 'int';
98
109
interface ModifyInputProps {
1110
type?: inputTypes;
@@ -14,7 +13,7 @@ interface ModifyInputProps {
1413
maxlength?: number;
1514
}
1615
17-
export interface Props<T extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>> extends Partial<ModifyDeep<HTMLAttributes<'input'>, ModifyInputProps>> {
16+
export interface Props<T extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>> extends Partial<ModifyDeep<astroHTML.JSX.InputHTMLAttributes, ModifyInputProps>> {
1817
name: string;
1918
errorMessage?: string;
2019
validate?: Function;

packages/forms/components/form/BOption.astro

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
import getContext from '@astro-utils/context';
33
import {validatePostRequest} from '../../dist/form-tools/post.js';
44
import {validateSelectOption} from '../../dist/components/select.js';
5-
import type { HTMLAttributes } from 'astro/types';
65
7-
export interface Props<T extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>> extends HTMLAttributes<'option'> {
6+
export interface Props<T extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>> extends astroHTML.JSX.OptionHTMLAttributes {
87
as?: T;
98
props?: React.ComponentProps<T>;
109
};

packages/forms/components/form/BSelect.astro

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ import {validateSelect} from '../../dist/components/select.js';
44
import {getSelectValue} from '../../dist/components/select.js';
55
import getContext from '@astro-utils/context';
66
import Context from '@astro-utils/context/Context.astro';
7-
import type { HTMLAttributes } from 'astro/types';
87
9-
export interface Props<T extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>> extends HTMLAttributes<'select'> {
8+
export interface Props<T extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>> extends astroHTML.JSX.SelectHTMLAttributes {
109
name: string
1110
errorMessage?: string
1211
type?: 'string' | 'number' | 'date',

packages/forms/components/form/BTextarea.astro

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ import getContext from '@astro-utils/context';
33
import {validateFormInput} from '../../dist/components/input-parse.js';
44
import {validatePostRequest} from '../../dist/form-tools/post.js';
55
import {ModifyDeep} from '../../dist/utils.js';
6-
import type { HTMLAttributes } from 'astro/types';
76
87
interface ModifyInputProps {
98
minlength?: number;
109
maxlength?: number;
1110
}
1211
13-
export interface Props<T extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>> extends Partial<ModifyDeep<HTMLAttributes<'textarea'>, ModifyInputProps>> {
12+
export interface Props<T extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>> extends Partial<ModifyDeep<astroHTML.JSX.TextareaHTMLAttributes, ModifyInputProps>> {
1413
name: string;
1514
errorMessage?: string;
1615
validate?: Function;

packages/forms/components/form/FormErrors.astro

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
import getContext from '@astro-utils/context';
3-
import type { HTMLAttributes } from 'astro/types';
43
5-
export interface Props extends HTMLAttributes<'div'> {
4+
export interface Props extends astroHTML.JSX.HTMLAttributes {
65
title?: string
76
};
87

0 commit comments

Comments
 (0)