work-in-progress atproto PDS
typescript atproto pds atcute

chore: tailwind nit

mary.my.id 2970cceb 12fc6ae9

verified
+11 -11
+1 -1
.vscode/settings.json
··· 1 1 { 2 2 "editor.defaultFormatter": "oxc.oxc-vscode", 3 3 "typescript.tsdk": "node_modules/typescript/lib", 4 - "tailwindCSS.classFunctions": ["cva", "cx"] 4 + "tailwindCSS.classFunctions": ["cn"] 5 5 }
+5 -5
packages/danaus/src/web/primitives/button.tsx
··· 1 - import type { ClassValue, JSXNode } from '@oomfware/jsx'; 1 + import { cn, type JSXNode } from '@oomfware/jsx'; 2 2 3 3 import type { InvokerCommand } from './utils/types.ts'; 4 4 ··· 31 31 children, 32 32 } = props; 33 33 34 - const cn: ClassValue[] = [ 34 + const classes = cn([ 35 35 'inline-flex appearance-none items-center justify-center gap-2 overflow-hidden align-middle select-none', 36 36 'text-base-300 font-medium', 37 37 'rounded-md border', ··· 70 70 ], 71 71 72 72 className, 73 - ]; 73 + ]); 74 74 75 75 if (href !== undefined) { 76 76 return ( 77 - <a href={href} data-target={targetId} class={cn}> 77 + <a href={href} data-target={targetId} class={classes}> 78 78 {children} 79 79 </a> 80 80 ); ··· 88 88 commandfor={commandfor} 89 89 command={command} 90 90 data-target={targetId} 91 - class={cn} 91 + class={classes} 92 92 > 93 93 {children} 94 94 </button>
+5 -5
packages/danaus/src/web/primitives/menu/item.tsx
··· 1 - import type { ClassValue, JSXNode } from '@oomfware/jsx'; 1 + import { cn, type JSXNode } from '@oomfware/jsx'; 2 2 3 3 import type { InvokerCommand } from '../utils/types.ts'; 4 4 ··· 20 20 const MenuItem = (props: MenuItemProps) => { 21 21 const { type = 'button', href, disabled, commandfor, command, class: className, children } = props; 22 22 23 - const cn: ClassValue = [ 23 + const classes = cn([ 24 24 'flex items-center gap-1 rounded-md px-2 py-1.5 text-left select-none', 25 25 'text-base-300 text-neutral-foreground-2', 26 26 'outline-2 -outline-offset-2 outline-transparent', ··· 30 30 'active:bg-neutral-background-1-active', 31 31 32 32 className, 33 - ]; 33 + ]); 34 34 35 35 if (href !== undefined) { 36 36 return ( 37 - <a href={href} class={cn}> 37 + <a href={href} class={classes}> 38 38 {children} 39 39 </a> 40 40 ); 41 41 } 42 42 43 43 return ( 44 - <button type={type} disabled={disabled} commandfor={commandfor} command={command} class={cn}> 44 + <button type={type} disabled={disabled} commandfor={commandfor} command={command} class={classes}> 45 45 {children} 46 46 </button> 47 47 );