Fix shifted text in create variants dialog (#1950)
* Fix radio labels misalignment * Remove DialogContent padding & move styles to external file
This commit is contained in:
parent
7b45ef2758
commit
879e1da69e
2 changed files with 16 additions and 13 deletions
|
@ -10,23 +10,13 @@ import Form from "@saleor/components/Form";
|
||||||
import FormSpacer from "@saleor/components/FormSpacer";
|
import FormSpacer from "@saleor/components/FormSpacer";
|
||||||
import RadioGroupField from "@saleor/components/RadioGroupField";
|
import RadioGroupField from "@saleor/components/RadioGroupField";
|
||||||
import { buttonMessages } from "@saleor/intl";
|
import { buttonMessages } from "@saleor/intl";
|
||||||
import { makeStyles } from "@saleor/macaw-ui";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { FormattedMessage } from "react-intl";
|
import { FormattedMessage } from "react-intl";
|
||||||
|
|
||||||
import { messages } from "./messages";
|
import { messages } from "./messages";
|
||||||
|
import { useStyles } from "./styles";
|
||||||
import { ProductVariantCreateOptionEnum } from "./types";
|
import { ProductVariantCreateOptionEnum } from "./types";
|
||||||
|
|
||||||
const useStyles = makeStyles(
|
|
||||||
theme => ({
|
|
||||||
option: {
|
|
||||||
marginBottom: theme.spacing(2),
|
|
||||||
width: 400
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
{ name: "ProductVariantCreateDialog" }
|
|
||||||
);
|
|
||||||
|
|
||||||
interface ProductVariantCreateDialogForm {
|
interface ProductVariantCreateDialogForm {
|
||||||
option: ProductVariantCreateOptionEnum;
|
option: ProductVariantCreateOptionEnum;
|
||||||
}
|
}
|
||||||
|
@ -71,13 +61,12 @@ const ProductVariantCreateDialog: React.FC<ProductVariantCreateDialogProps> = pr
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
<FormattedMessage {...messages.title} />
|
<FormattedMessage {...messages.title} />
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<DialogContent>
|
<DialogContent className={classes.dialogContent}>
|
||||||
<Typography variant="body2">
|
<Typography variant="body2">
|
||||||
<FormattedMessage {...messages.description} />
|
<FormattedMessage {...messages.description} />
|
||||||
</Typography>
|
</Typography>
|
||||||
<FormSpacer />
|
<FormSpacer />
|
||||||
<RadioGroupField
|
<RadioGroupField
|
||||||
alignTop
|
|
||||||
choices={options.map(option => ({
|
choices={options.map(option => ({
|
||||||
label: (
|
label: (
|
||||||
<div
|
<div
|
||||||
|
|
14
src/products/components/ProductVariantCreateDialog/styles.ts
Normal file
14
src/products/components/ProductVariantCreateDialog/styles.ts
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import { makeStyles } from "@saleor/macaw-ui";
|
||||||
|
|
||||||
|
export const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
|
option: {
|
||||||
|
marginBottom: theme.spacing(2),
|
||||||
|
width: 400
|
||||||
|
},
|
||||||
|
dialogContent: {
|
||||||
|
padding: 0
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
{ name: "ProductVariantCreateDialog" }
|
||||||
|
);
|
Loading…
Reference in a new issue