feat(design): migrate the Incidents list to TableCard with server-side views, sort, filters and paging
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
+13
-13
@@ -19,18 +19,18 @@ type Props = ButtonHTMLAttributes<HTMLButtonElement> & {
|
||||
mobile?: boolean
|
||||
}
|
||||
|
||||
export function Button({ variant = 'primary', block = false, mobile = false, className, type = 'button', ...rest }: Props) {
|
||||
return (
|
||||
<button
|
||||
type={type}
|
||||
className={cx(
|
||||
BASE,
|
||||
VARIANTS[variant],
|
||||
mobile && variant !== 'icon' && 'h-12 rounded-xl text-sm',
|
||||
block && 'w-full',
|
||||
className,
|
||||
)}
|
||||
{...rest}
|
||||
/>
|
||||
export function buttonClass(
|
||||
variant: Variant = 'primary',
|
||||
opts: { block?: boolean; mobile?: boolean } = {},
|
||||
): string {
|
||||
return cx(
|
||||
BASE,
|
||||
VARIANTS[variant],
|
||||
opts.mobile && variant !== 'icon' && 'h-12 rounded-xl text-sm',
|
||||
opts.block && 'w-full',
|
||||
)
|
||||
}
|
||||
|
||||
export function Button({ variant = 'primary', block = false, mobile = false, className, type = 'button', ...rest }: Props) {
|
||||
return <button type={type} className={cx(buttonClass(variant, { block, mobile }), className)} {...rest} />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user