mirror of
https://github.com/sakaljurgis/best-choice.git
synced 2026-07-08 21:47:40 +00:00
prices edit
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ExternalLink, Pencil } from 'lucide-react';
|
||||
import { ExternalLink } from 'lucide-react';
|
||||
import type { Item } from '@shared/models/item';
|
||||
import { ItemPricesPanel } from './item-prices-panel';
|
||||
import { formatAttributeValue, getPriceSummaryDisplay } from './project-items-utils';
|
||||
@@ -74,21 +74,24 @@ export function ProjectItemsMobileList({
|
||||
))}
|
||||
</div>
|
||||
<div className="mt-3 flex flex-col gap-0.5 text-xs">
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="text-sm font-semibold text-slate-900">{priceDisplay.primary}</span>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => onTogglePrices(item.id)}
|
||||
className="inline-flex h-9 w-9 items-center justify-center rounded-md text-slate-500 transition hover:text-slate-400 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-white"
|
||||
aria-label="Edit Prices"
|
||||
title="Edit Prices"
|
||||
aria-expanded={isExpanded}
|
||||
aria-controls={panelId}
|
||||
>
|
||||
<Pencil aria-hidden className="h-4 w-4" />
|
||||
<span className="sr-only">Edit Prices</span>
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => onTogglePrices(item.id)}
|
||||
className="inline-flex items-center gap-2 self-start rounded-md text-left text-sm font-semibold text-slate-900 transition hover:text-blue-600 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-white"
|
||||
title={isExpanded ? 'Close Prices' : 'View Prices'}
|
||||
aria-expanded={isExpanded}
|
||||
aria-controls={panelId}
|
||||
>
|
||||
<span>{priceDisplay.primary}</span>
|
||||
{isExpanded ? (
|
||||
<span className="text-xs font-medium uppercase tracking-wide text-slate-500">
|
||||
Close
|
||||
</span>
|
||||
) : null}
|
||||
<span className="sr-only">
|
||||
{isExpanded ? 'Close price list' : 'View price list'}
|
||||
</span>
|
||||
</button>
|
||||
{priceDisplay.secondary ? (
|
||||
<span className="text-slate-500">{priceDisplay.secondary}</span>
|
||||
) : null}
|
||||
|
||||
Reference in New Issue
Block a user