refactor: update EmptyState and PublicOfferingCard components for improved UI consistency

- Enhanced the EmptyState component by adjusting button properties to include left icons for better visual alignment.
- Refactored the PublicOfferingCard component to simplify the layout of pricing notes, improving readability and consistency in design.
- Made minor adjustments to spacing and layout properties across both components to enhance overall user experience.
This commit is contained in:
barsa 2026-03-06 16:50:40 +09:00
parent 88ca636b59
commit de5a210e6f
3 changed files with 22 additions and 15 deletions

View File

@ -58,13 +58,20 @@ export function EmptyState({
{action && {action &&
(action.href ? ( (action.href ? (
<Button as="a" href={action.href} size={isCompact ? "sm" : "default"}> <Button
<PlusIcon className="h-4 w-4 mr-2" /> as="a"
href={action.href}
size={isCompact ? "sm" : "default"}
leftIcon={<PlusIcon className="h-4 w-4" />}
>
{action.label} {action.label}
</Button> </Button>
) : ( ) : (
<Button onClick={action.onClick} size={isCompact ? "sm" : "default"}> <Button
<PlusIcon className="h-4 w-4 mr-2" /> onClick={action.onClick}
size={isCompact ? "sm" : "default"}
leftIcon={<PlusIcon className="h-4 w-4" />}
>
{action.label} {action.label}
</Button> </Button>
))} ))}

View File

@ -132,7 +132,7 @@ function PublicTierCard({ tier }: { tier: TierInfo }) {
</div> </div>
<div className="mb-2"> <div className="mb-2">
<div className="flex items-baseline gap-0.5 flex-wrap"> <div className="flex items-baseline gap-0.5">
<span className="text-lg font-bold text-foreground"> <span className="text-lg font-bold text-foreground">
¥{tier.monthlyPrice.toLocaleString()} ¥{tier.monthlyPrice.toLocaleString()}
{tier.maxMonthlyPrice && {tier.maxMonthlyPrice &&
@ -140,17 +140,17 @@ function PublicTierCard({ tier }: { tier: TierInfo }) {
`~${tier.maxMonthlyPrice.toLocaleString()}`} `~${tier.maxMonthlyPrice.toLocaleString()}`}
</span> </span>
<span className="text-[10px] text-muted-foreground">/mo</span> <span className="text-[10px] text-muted-foreground">/mo</span>
{tier.pricingNote && (
<span
className={cn(
"text-[10px] ml-1",
tier.tier === "Platinum" ? "text-primary" : "text-amber-600"
)}
>
{tier.pricingNote}
</span>
)}
</div> </div>
{tier.pricingNote && (
<span
className={cn(
"text-[10px] block",
tier.tier === "Platinum" ? "text-primary" : "text-amber-600"
)}
>
{tier.pricingNote}
</span>
)}
</div> </div>
<p className="text-[11px] text-muted-foreground mb-2">{tier.description}</p> <p className="text-[11px] text-muted-foreground mb-2">{tier.description}</p>

BIN
image.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 74 KiB