Touch-size the list-card footer actions (#105) #115
@@ -1,10 +1,15 @@
|
||||
// Shared footer-action button styling for list cards (garden/plant), so the
|
||||
// verbatim class strings don't drift between them.
|
||||
//
|
||||
// Sized for touch: a ~40px-tall tap target (min-h + py-2) rather than the old
|
||||
// ~28px text-link row, which was easy to mis-tap on a phone (#105). The min-h is
|
||||
// what guarantees the target even when the label is short.
|
||||
|
||||
export const cardActionClass =
|
||||
'rounded-md px-2.5 py-1 text-sm font-medium text-muted outline-none transition-colors ' +
|
||||
'hover:bg-border/50 hover:text-fg focus-visible:ring-2 focus-visible:ring-accent/40'
|
||||
const cardActionBase =
|
||||
|
|
||||
'inline-flex min-h-[2.5rem] items-center rounded-md px-3 py-2 text-sm font-medium ' +
|
||||
'text-muted outline-none transition-colors focus-visible:ring-2'
|
||||
|
||||
export const cardActionClass = `${cardActionBase} hover:bg-border/50 hover:text-fg focus-visible:ring-accent/40`
|
||||
|
||||
export const cardDangerClass =
|
||||
'rounded-md px-2.5 py-1 text-sm font-medium text-muted outline-none transition-colors ' +
|
||||
'hover:bg-red-500/10 hover:text-red-600 focus-visible:ring-2 focus-visible:ring-red-500/40 dark:hover:text-red-400'
|
||||
`${cardActionBase} hover:bg-red-500/10 hover:text-red-600 focus-visible:ring-red-500/40 dark:hover:text-red-400`
|
||||
|
||||
Reference in New Issue
Block a user
⚪ Mixed string-concatenation and template-literal styling in same block
maintainability · flagged by 1 model
web/src/components/ui/cardActions.ts:8-15— Minor style inconsistency:cardActionBaseis defined with string concatenation ('...' + '...') while the two exports below it use template literals (`${...}`). The PR mixes the two forms within the same 8-line block. Trivial, but worth picking one form for readability.🪰 Gadfly · advisory