Skip to content

Commit d552673

Browse files
fix(admin-ui): fix height of Bulk Editor cells to always be 40px (medusajs#5737)
1 parent 547b16e commit d552673

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

.changeset/chilled-lions-wash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@medusajs/admin-ui": patch
3+
---
4+
5+
fix(admin-ui): Fix height of Bulk Editor cells when product has few variants"

packages/admin-ui/ui/src/components/organisms/product-variants-section/edit-prices-modal/currency-cell.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import React, { forwardRef, useEffect, useRef, useState } from "react"
21
import { ProductVariant } from "@medusajs/client-types"
3-
import AmountField from "react-currency-input-field"
42
import clsx from "clsx"
3+
import React, { forwardRef, useEffect, useRef, useState } from "react"
4+
import AmountField from "react-currency-input-field"
55

6-
import { currencies as CURRENCY_MAP } from "../../../../utils/currencies"
76
import { useAdminRegions } from "medusa-react"
7+
import { currencies as CURRENCY_MAP } from "../../../../utils/currencies"
88

99
/**
1010
* Return currency metadata or metadata of region's currency
@@ -197,7 +197,7 @@ function CurrencyCell(props: CurrencyCellProps) {
197197
<td
198198
onMouseOver={() => onColumnOver(currencyCode || region)}
199199
onMouseDown={onCellMouseDown}
200-
className={clsx("relative cursor-pointer border pr-2 pl-4", {
200+
className={clsx("relative h-10 cursor-pointer border pl-4 pr-2", {
201201
"bg-blue-100": isSelected && !isAnchor,
202202
})}
203203
style={{

packages/admin-ui/ui/src/components/organisms/product-variants-section/edit-prices-modal/edit-prices-table.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -677,12 +677,12 @@ function EditPricesTable(props: EditPricesTableProps) {
677677
(e) => e.preventDefault()
678678
}
679679
style={{ fontSize: 13, borderCollapse: "collapse" }}
680-
className="h-full w-full table-auto"
680+
className="w-full table-auto"
681681
>
682682
<thead>
683683
<tr
684684
style={{ height: 42 }}
685-
className="tw-text-medusa-text-subtle h-2 text-left font-normal"
685+
className="tw-text-medusa-text-subtle h-10 text-left font-normal"
686686
>
687687
<th className="h-2 border border-t-0 pl-4 font-medium text-gray-400">
688688
Product
@@ -734,7 +734,7 @@ function EditPricesTable(props: EditPricesTableProps) {
734734
</tr>
735735
</thead>
736736
<tbody>
737-
<tr style={{ lineHeight: 3, background: "#f9fafb" }}>
737+
<tr style={{ lineHeight: 3, background: "#f9fafb" }} className="">
738738
<td className="border pl-4 pr-4">
739739
<div className="text-black-800 flex items-center gap-2 overflow-hidden">
740740
{props.product.thumbnail && (
@@ -768,7 +768,7 @@ function EditPricesTable(props: EditPricesTableProps) {
768768
onMouseEnter={() => onMouseRowEnter(variant.id)}
769769
style={{ lineHeight: 3 }}
770770
>
771-
<td className="whitespace-nowrap border pl-10 pr-4 text-gray-600">
771+
<td className="h-10 whitespace-nowrap border pl-10 pr-4 text-gray-600">
772772
{variant.title} {variant.sku && `∙ ${variant.sku}`}
773773
</td>
774774

0 commit comments

Comments
 (0)