mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-10 05:15:35 +08:00
fix: tableSizeClassName not been generated by tailwindcss
This commit is contained in:
parent
986e8c2632
commit
5f4f9a8ae8
@ -40,6 +40,7 @@ import {
|
||||
import { formatTimeFromNow } from '~/helpers'
|
||||
import {
|
||||
secret,
|
||||
tableSize,
|
||||
tableSizeClassName,
|
||||
useRequest,
|
||||
wsEndpointURL,
|
||||
@ -336,10 +337,7 @@ export default () => {
|
||||
<For each={tabs()}>
|
||||
{(tab) => (
|
||||
<button
|
||||
class={twMerge(
|
||||
activeTab() === tab.type && 'tab-active',
|
||||
'tab tab-xs',
|
||||
)}
|
||||
class={twMerge(activeTab() === tab.type && 'tab-active', 'tab')}
|
||||
onClick={() => setActiveTab(tab.type)}
|
||||
>
|
||||
{tab.name} ({tab.count})
|
||||
@ -350,26 +348,26 @@ export default () => {
|
||||
|
||||
<div class="flex w-full flex-wrap items-center gap-2">
|
||||
<input
|
||||
class="input input-primary input-sm flex-1"
|
||||
class="input input-primary flex-1"
|
||||
placeholder={t('search')}
|
||||
onInput={(e) => setSearch(e.target.value)}
|
||||
/>
|
||||
|
||||
<Button
|
||||
class="btn-circle btn-sm"
|
||||
class="btn-circle"
|
||||
onClick={() => setPaused((paused) => !paused)}
|
||||
>
|
||||
{paused() ? <IconPlayerPlay /> : <IconPlayerPause />}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
class="btn-circle btn-sm"
|
||||
class="btn-circle"
|
||||
onClick={() => request.delete('connections')}
|
||||
>
|
||||
<IconCircleX />
|
||||
</Button>
|
||||
|
||||
<label for="connection-modal" class="btn btn-circle btn-sm">
|
||||
<label for="connection-modal" class="btn btn-circle">
|
||||
<IconSettings />
|
||||
</label>
|
||||
|
||||
@ -388,7 +386,7 @@ export default () => {
|
||||
<div class="overflow-x-auto whitespace-nowrap rounded-md bg-base-300">
|
||||
<table
|
||||
class={twMerge(
|
||||
tableSizeClassName(),
|
||||
tableSizeClassName(tableSize()),
|
||||
'table table-zebra relative rounded-none',
|
||||
)}
|
||||
>
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
} from '@tanstack/solid-table'
|
||||
import { For, createEffect, createSignal } from 'solid-js'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
import { secret, tableSizeClassName, wsEndpointURL } from '~/signals'
|
||||
import { secret, tableSize, tableSizeClassName, wsEndpointURL } from '~/signals'
|
||||
import { Log } from '~/types'
|
||||
|
||||
type LogWithSeq = Log & { seq: number }
|
||||
@ -77,7 +77,10 @@ export default () => {
|
||||
|
||||
<div class="overflow-x-auto whitespace-nowrap rounded-md bg-base-300">
|
||||
<table
|
||||
class={twMerge(tableSizeClassName(), 'table relative rounded-none')}
|
||||
class={twMerge(
|
||||
tableSizeClassName(tableSize()),
|
||||
'table relative rounded-none',
|
||||
)}
|
||||
>
|
||||
<thead class="sticky top-0 z-10">
|
||||
<For each={table.getHeaderGroups()}>
|
||||
|
@ -55,8 +55,7 @@ export const [tableSize, setTableSize] = makePersisted(
|
||||
{ name: 'tableSize', storage: localStorage },
|
||||
)
|
||||
|
||||
export const tableSizeClassName = () => {
|
||||
const size = tableSize()
|
||||
export const tableSizeClassName = (size: TAILWINDCSS_SIZE) => {
|
||||
let className = 'table-xs'
|
||||
|
||||
switch (size) {
|
||||
|
@ -5,7 +5,7 @@ import { Config } from 'tailwindcss'
|
||||
import safeArea from 'tailwindcss-safe-area'
|
||||
|
||||
export default {
|
||||
content: ['./src/**/*.{css,tsx}'],
|
||||
content: ['./src/**/*.{css,ts,tsx}'],
|
||||
plugins: [daisyui, safeArea],
|
||||
daisyui: { themes: true },
|
||||
theme: {
|
||||
|
Loading…
Reference in New Issue
Block a user