diff --git a/src/products/components/ProductVariantCreateDialog/ProductVariantCreateContent.tsx b/src/products/components/ProductVariantCreateDialog/ProductVariantCreateContent.tsx index 28ee51a60..01944bf5c 100644 --- a/src/products/components/ProductVariantCreateDialog/ProductVariantCreateContent.tsx +++ b/src/products/components/ProductVariantCreateDialog/ProductVariantCreateContent.tsx @@ -16,6 +16,7 @@ import { ProductVariantCreateStep } from "./types"; const useStyles = makeStyles((theme: Theme) => ({ root: { maxHeight: 400, + overflowX: "hidden", overflowY: "scroll", paddingLeft: theme.spacing.unit * 3, position: "relative", @@ -74,6 +75,7 @@ const ProductVariantCreateContent: React.FC< {step === "prices" && ( dispatchFormDataAction({ diff --git a/src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx b/src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx index 480fbfa6b..d8d2fb0ea 100644 --- a/src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx +++ b/src/products/components/ProductVariantCreateDialog/ProductVariantCreatePrices.tsx @@ -20,6 +20,9 @@ const useStyles = makeStyles((theme: Theme) => ({ marginBottom: theme.spacing.unit, marginTop: theme.spacing.unit / 2 }, + hrAttribute: { + marginTop: theme.spacing.unit * 2 + }, label: { alignSelf: "center" }, @@ -31,6 +34,7 @@ const useStyles = makeStyles((theme: Theme) => ({ export type PriceOrStock = "price" | "stock"; export interface ProductVariantCreatePricesProps { attributes: ProductDetails_product_productType_variantAttributes[]; + currencySymbol: string; data: ProductVariantCreateFormData; onApplyPriceOrStockChange: (applyToAll: boolean, type: PriceOrStock) => void; onApplyToAllChange: (value: string, type: PriceOrStock) => void; @@ -47,6 +51,7 @@ const ProductVariantCreatePrices: React.FC< > = props => { const { attributes, + currencySymbol, data, onApplyPriceOrStockChange, onApplyToAllChange, @@ -108,6 +113,9 @@ const ProductVariantCreatePrices: React.FC< min: 0, type: "number" }} + InputProps={{ + endAdornment: currencySymbol + }} label={intl.formatMessage({ defaultMessage: "Price", id: "productVariantCreatePricesPriceInputLabel" @@ -128,7 +136,7 @@ const ProductVariantCreatePrices: React.FC< {!data.price.all && ( <> - +
+
{priceAttributeValues && priceAttributeValues.map((attributeValue, attributeValueIndex) => ( <> - +
{attributeValue.name}
@@ -166,6 +175,13 @@ const ProductVariantCreatePrices: React.FC< description: "variant price", id: "productVariantCreatePricesSetPricePlaceholder" })} + inputProps={{ + min: 0, + type: "number" + }} + InputProps={{ + endAdornment: currencySymbol + }} fullWidth value={data.price.values[attributeValueIndex].value} onChange={event => @@ -226,7 +242,7 @@ const ProductVariantCreatePrices: React.FC< {!data.stock.all && ( <> - +
+
{stockAttributeValues && stockAttributeValues.map((attributeValue, attributeValueIndex) => ( <> - +
{attributeValue.name}
diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap index a4f3bf4d2..5cae43c9c 100644 --- a/src/storybook/__snapshots__/Stories.test.ts.snap +++ b/src/storybook/__snapshots__/Stories.test.ts.snap @@ -83850,7 +83850,7 @@ exports[`Storyshots Views / Products / Create multiple variants prices and SKU 1 Price
+
@@ -84167,7 +84173,7 @@ exports[`Storyshots Views / Products / Create multiple variants prices and SKU 1 class="FormSpacer-spacer-id" />
+