mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-12 08:30:08 +00:00
## Summary Enable `better-tailwindcss/enforce-canonical-classes` lint rule and auto-fix all 611 violations across 173 files. Stacked on #9417. ## Changes - **What**: Simplify Tailwind classes to canonical forms via `eslint --fix`: - `h-X w-X` → `size-X` - `overflow-x-hidden overflow-y-hidden` → `overflow-hidden` - and other canonical simplifications - Enable `enforce-canonical-classes` as `'error'` in eslint config ## Review Focus Mechanical auto-fix PR — all changes produced by `eslint --fix`. No visual or behavioral changes; canonical forms are functionally identical. **Stack:** #9417 → **this PR** → PR 3 (class order) Fixes #9300 (partial — 2 of 3 rules) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9427-fix-enable-enforce-canonical-classes-tailwind-lint-rule-31a6d73d365081a49340d7d4640ede45) by [Unito](https://www.unito.io)
49 lines
1.1 KiB
Vue
49 lines
1.1 KiB
Vue
<template>
|
|
<div
|
|
class="flex min-h-80 w-full min-w-116 flex-col rounded-2xl bg-base-background"
|
|
>
|
|
<!-- Header -->
|
|
<div
|
|
class="flex h-12 items-center justify-between border-b border-border-default px-4"
|
|
>
|
|
<div class="flex items-center gap-2">
|
|
<slot name="header-icon" />
|
|
<h2 class="m-0 text-sm font-normal text-base-foreground">
|
|
<slot name="title" />
|
|
</h2>
|
|
</div>
|
|
<Button
|
|
v-if="showClose"
|
|
variant="muted-textonly"
|
|
class="-mr-1"
|
|
:aria-label="$t('g.close')"
|
|
@click="$emit('close')"
|
|
>
|
|
<i class="pi pi-times size-4" />
|
|
</Button>
|
|
</div>
|
|
|
|
<!-- Body -->
|
|
<div class="flex flex-1 flex-col gap-4 p-4">
|
|
<slot />
|
|
</div>
|
|
|
|
<!-- Footer -->
|
|
<div class="flex items-center justify-end gap-4 p-4">
|
|
<slot name="footer" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import Button from '@/components/ui/button/Button.vue'
|
|
|
|
const { showClose = true } = defineProps<{
|
|
showClose?: boolean
|
|
}>()
|
|
|
|
defineEmits<{
|
|
close: []
|
|
}>()
|
|
</script>
|