Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

591 B
Raw Blame
import type { ReactNode } from 'react'
import { useTranslation } from 'react-i18next'

/** One labelled value in a read-only card, with a placeholder when unset. */
export function ReadRow({ label, children }: { label: string; children: ReactNode }) {
  const { t } = useTranslation()

  return (
    <div className="flex items-start justify-between gap-3 text-sm">
      <span className="text-muted-foreground">{label}</span>
      <span className="text-right">
        {children ?? <span className="text-muted-foreground">{t('profile.not_provided')}</span>}
      </span>
    </div>
  )
}