Skip to content

Commit

Permalink
fix: typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
segunadebayo committed Aug 12, 2024
1 parent c8179a7 commit f99f5ae
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
1 change: 1 addition & 0 deletions packages/react/src/components/field/field-root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface FieldRootProps extends HTMLProps<'div'>, FieldRootBaseProps {}
export const FieldRoot = forwardRef<HTMLDivElement, FieldRootProps>((props, ref) => {
const [useFieldProps, localProps] = createSplitProps<UseFieldProps>()(props, [
'id',
'ids',
'disabled',
'invalid',
'readOnly',
Expand Down
1 change: 1 addition & 0 deletions packages/solid/src/components/field/field-root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export interface FieldRootProps extends HTMLProps<'div'>, FieldRootBaseProps {}
export const FieldRoot = (props: FieldRootProps) => {
const [useFieldProps, localProps] = createSplitProps<UseFieldProps>()(props, [
'id',
'ids',
'disabled',
'invalid',
'readOnly',
Expand Down
12 changes: 12 additions & 0 deletions packages/vue/src/components/field/field.types.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
export interface ElementIds {
root?: string
control?: string
label?: string
errorText?: string
helperText?: string
}

export interface RootProps {
/**
* The id of the field.
*/
id?: string
/**
* The ids of the field parts.
*/
ids?: ElementIds
/**
* Indicates whether the field is required.
*/
Expand Down
9 changes: 1 addition & 8 deletions packages/vue/src/components/field/use-field.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import { ariaAttr, dataAttr, getWindow } from '@zag-js/dom-query'
import { type HTMLAttributes, computed, onBeforeUnmount, onMounted, reactive, ref } from 'vue'
import { parts } from './field.anatomy'

export interface ElementIds {
root?: string
control?: string
label?: string
errorText?: string
helperText?: string
}
import type { ElementIds } from './field.types'

export interface UseFieldProps {
/**
Expand Down

0 comments on commit f99f5ae

Please sign in to comment.