18 行
731 B
TypeScript
18 行
731 B
TypeScript
import CountsResizeHandle from '@/components/counts/CountsResizeHandle'
|
|
import { useUITranslation } from '@/lib/useUITranslation'
|
|
|
|
|
|
const CountsRowNumber = ({ value, rowSpan }: { value?: number; rowSpan?: number }) => {
|
|
const { label, message } = useUITranslation ('counts')
|
|
if (value != null) return <td data-counts-copy={String (value)}
|
|
className="border-b px-2 py-1 text-right align-top tabular-nums dark:border-slate-700">
|
|
{value}</td>
|
|
return <th rowSpan={rowSpan} data-counts-heading={message ('rowNumberHeading').text} className="relative px-2 py-1">
|
|
{label ('rowNumberHeading')}
|
|
<CountsResizeHandle field="row_number" label={message ('rowNumberHeading')}/>
|
|
</th>
|
|
}
|
|
|
|
|
|
export default CountsRowNumber
|