feat(dashboard): restructure create product flow (#7374)

This commit is contained in:
Frane Polić
2024-05-28 13:59:02 +02:00
committed by GitHub
parent 76ec10f375
commit 6117af2704
46 changed files with 3161 additions and 395 deletions
@@ -0,0 +1,25 @@
import { useDataGridCell } from "../hooks"
import { DataGridCellProps } from "../types"
import { DataGridCellContainer } from "./data-grid-cell-container"
export const DataGridNumberCell = <TData, TValue = any>({
field,
context,
}: DataGridCellProps<TData, TValue>) => {
const { register, attributes, container } = useDataGridCell({
field,
context,
})
return (
<DataGridCellContainer {...container}>
<input
{...attributes}
type="number"
{...register(field, {
valueAsNumber: true,
})}
/>
</DataGridCellContainer>
)
}