@daysnap/horn-ui
Version:
hron ui
18 lines (15 loc) • 653 B
text/typescript
import type { ExtractPropTypes } from 'vue'
import { horCellProps } from '../hor-cell'
import { horInputProps } from '../hor-input'
import { omit } from '@daysnap/utils'
import { makeBooleanProp, makeStringProp, makeNumericProp } from '../utils'
export const omitHorCellPropsInField = omit(horCellProps, ['value'])
export const omitHorInputPropsInField = omit(horInputProps, ['modelValue'])
export const horFieldProps = {
...omitHorCellPropsInField,
...omitHorInputPropsInField,
clearable: makeBooleanProp(true),
unit: makeStringProp(''),
modelValue: makeNumericProp(''),
}
export type HorFieldProps = ExtractPropTypes<typeof horFieldProps>