Button icon-touch/sm-touch sizes replace the repeated touch-target classes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -616,8 +616,8 @@ export function DashboardEditor({
|
||||
</span>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="h-11 shrink-0 md:h-8"
|
||||
size="sm-touch"
|
||||
className="shrink-0"
|
||||
onClick={reflow}
|
||||
data-testid="reflow-canvas"
|
||||
>
|
||||
@@ -630,8 +630,8 @@ export function DashboardEditor({
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="size-11 text-muted-foreground md:size-8"
|
||||
size="icon-touch"
|
||||
className="text-muted-foreground"
|
||||
onClick={() => setPaletteOpen(true)}
|
||||
aria-label="Add widget"
|
||||
data-testid="add-widget"
|
||||
@@ -646,9 +646,9 @@ export function DashboardEditor({
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
size="icon-touch"
|
||||
className={cn(
|
||||
"size-11 text-muted-foreground md:size-8",
|
||||
"text-muted-foreground",
|
||||
settingsOpen && "text-primary",
|
||||
)}
|
||||
onClick={() => {
|
||||
@@ -675,8 +675,8 @@ export function DashboardEditor({
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="size-11 text-muted-foreground md:size-8"
|
||||
size="icon-touch"
|
||||
className="text-muted-foreground"
|
||||
onClick={() => setDiscardOpen(true)}
|
||||
aria-label="Discard the unpublished changes"
|
||||
data-testid="discard-dashboard"
|
||||
@@ -697,8 +697,8 @@ export function DashboardEditor({
|
||||
<span>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="size-11 text-muted-foreground md:size-8"
|
||||
size="icon-touch"
|
||||
className="text-muted-foreground"
|
||||
onClick={() => void publishDashboard()}
|
||||
disabled={
|
||||
!hasDraft || publish.isPending || save.isPending
|
||||
@@ -736,8 +736,8 @@ export function DashboardEditor({
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="size-11 text-muted-foreground md:size-8"
|
||||
size="icon-touch"
|
||||
className="text-muted-foreground"
|
||||
aria-label="Open the panel view"
|
||||
data-testid="open-view"
|
||||
asChild
|
||||
@@ -756,8 +756,7 @@ export function DashboardEditor({
|
||||
|
||||
<Button
|
||||
variant={edit ? "brand" : "secondary"}
|
||||
size="sm"
|
||||
className="h-11 gap-1.5 md:h-8"
|
||||
size="sm-touch"
|
||||
onClick={() => setEdit(!edit)}
|
||||
data-testid="toggle-edit"
|
||||
>
|
||||
|
||||
@@ -274,11 +274,8 @@ function PanelRow({
|
||||
</span>
|
||||
<Button
|
||||
variant={confirmRemove ? "destructive" : "ghost"}
|
||||
size="icon"
|
||||
className={cn(
|
||||
"size-11 shrink-0 md:size-8",
|
||||
!confirmRemove && "text-muted-foreground",
|
||||
)}
|
||||
size="icon-touch"
|
||||
className={cn("shrink-0", !confirmRemove && "text-muted-foreground")}
|
||||
aria-label={removeLabel}
|
||||
title={removeLabel}
|
||||
data-testid={`remove-panel-${panel.id}`}
|
||||
|
||||
Reference in New Issue
Block a user