mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-23 00:15:05 +01:00
chore: add eslint rules for spacing (#464)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
committed by
GitHub
parent
1bc055935e
commit
5221294f78
@@ -38,7 +38,7 @@ import { defu } from 'defu'
|
||||
import UIcon from '../elements/Icon.vue'
|
||||
import UAvatar from '../elements/Avatar.vue'
|
||||
import UButton from '../elements/Button.vue'
|
||||
import type { Avatar} from '../../types/avatar'
|
||||
import type { Avatar } from '../../types/avatar'
|
||||
import type { Button } from '../../types/button'
|
||||
import { classNames } from '../../utils'
|
||||
import { useAppConfig } from '#imports'
|
||||
|
||||
@@ -84,7 +84,7 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
|
||||
const switchClass = computed(()=>{
|
||||
const switchClass = computed(() => {
|
||||
return classNames(
|
||||
ui.value.base,
|
||||
ui.value.rounded,
|
||||
@@ -93,13 +93,13 @@ export default defineComponent({
|
||||
)
|
||||
})
|
||||
|
||||
const onIconClass = computed(()=>{
|
||||
const onIconClass = computed(() => {
|
||||
return classNames(
|
||||
ui.value.icon.on.replaceAll('{color}', props.color)
|
||||
)
|
||||
})
|
||||
|
||||
const offIconClass = computed(()=>{
|
||||
const offIconClass = computed(() => {
|
||||
return classNames(
|
||||
ui.value.icon.off.replaceAll('{color}', props.color)
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<component
|
||||
:is="$attrs.onSubmit ? 'form': as"
|
||||
:is="$attrs.onSubmit ? 'form' : as"
|
||||
:class="[ui.base, ui.rounded, ui.divide, ui.ring, ui.shadow, ui.background]"
|
||||
v-bind="$attrs"
|
||||
>
|
||||
|
||||
@@ -123,7 +123,7 @@ export default defineComponent({
|
||||
return typeof label === 'function' ? label(props.query) : label
|
||||
})
|
||||
|
||||
function highlight (text: string, { indices, value }: { indices: number[][], value:string }): string {
|
||||
function highlight (text: string, { indices, value }: { indices: number[][], value: string }): string {
|
||||
if (text === value) {
|
||||
return ''
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ import UAvatar from '../elements/Avatar.vue'
|
||||
import UButton from '../elements/Button.vue'
|
||||
import { useTimer } from '../../composables/useTimer'
|
||||
import type { NotificationAction } from '../../types'
|
||||
import type { Avatar} from '../../types/avatar'
|
||||
import type { Avatar } from '../../types/avatar'
|
||||
import type { Button } from '../../types/button'
|
||||
import { classNames } from '../../utils'
|
||||
import { useAppConfig } from '#imports'
|
||||
|
||||
2
src/runtime/types/avatar.d.ts
vendored
2
src/runtime/types/avatar.d.ts
vendored
@@ -1,7 +1,7 @@
|
||||
export interface Avatar {
|
||||
src?: string | boolean
|
||||
alt?: string
|
||||
text:? string
|
||||
text?: string
|
||||
size?: string
|
||||
chipColor?: string
|
||||
chipVariant?: string
|
||||
|
||||
Reference in New Issue
Block a user