mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-23 08:20:39 +01:00
feat(components): uniformize colors and variants (#141)
This commit is contained in:
@@ -11,6 +11,7 @@ type Props<T> = {
|
||||
color?: GetObjectField<T, 'color'>
|
||||
eagerValidation?: boolean
|
||||
legend?: string
|
||||
highlight?: boolean
|
||||
disabled?: boolean
|
||||
}
|
||||
|
||||
@@ -64,7 +65,8 @@ export function useFormField<T>(props?: Props<T>) {
|
||||
id: computed(() => props?.id ?? formField?.value.id),
|
||||
name: computed(() => props?.name ?? formField?.value.name),
|
||||
size: computed(() => props?.size ?? formField?.value.size),
|
||||
color: computed(() => formField?.value.error ? 'red' : props?.color),
|
||||
color: computed(() => formField?.value.error ? 'error' : props?.color),
|
||||
highlight: computed(() => formField?.value.error ? true : props?.highlight),
|
||||
disabled: computed(() => formOptions?.value.disabled || props?.disabled),
|
||||
emitFormBlur,
|
||||
emitFormInput,
|
||||
|
||||
Reference in New Issue
Block a user