diff --git a/src/attributes/components/AttributeProperties/AttributeProperties.tsx b/src/attributes/components/AttributeProperties/AttributeProperties.tsx index fbbb328d9..45cdd9906 100644 --- a/src/attributes/components/AttributeProperties/AttributeProperties.tsx +++ b/src/attributes/components/AttributeProperties/AttributeProperties.tsx @@ -144,7 +144,7 @@ const AttributeProperties: React.FC = ({ description="add attribute as column in product list table" /> - + } diff --git a/src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx b/src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx index b9677c595..47ff7d60c 100644 --- a/src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx +++ b/src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx @@ -150,6 +150,7 @@ const CollectionCreatePage: React.StatelessComponent< errors={formErrors} disabled={disabled} onChange={change} + translate="collection" /> diff --git a/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx b/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx index bd56fe160..3a5fb782d 100644 --- a/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx +++ b/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx @@ -125,6 +125,7 @@ const CollectionDetailsPage: React.StatelessComponent< errors={formErrors} disabled={disabled} onChange={change} + translate="collection" > createStyles({ + backArrow: { + fontSize: 30 + }, menuButton: { flex: "0 0 auto", marginLeft: theme.spacing.unit * -2, @@ -25,9 +28,6 @@ const styles = (theme: Theme) => marginTop: -theme.spacing.unit * 2 }, root: { - "& svg": { - fontSize: 30 - }, "&:hover": { color: theme.typography.body2.color }, @@ -60,7 +60,7 @@ const AppHeader = withStyles(styles, { name: "AppHeader" })( anchor ? (
- + {children ? ( {children} ) : ( diff --git a/src/components/TablePagination/TablePaginationActions.tsx b/src/components/TablePagination/TablePaginationActions.tsx index 244777cb6..f22bd3670 100644 --- a/src/components/TablePagination/TablePaginationActions.tsx +++ b/src/components/TablePagination/TablePaginationActions.tsx @@ -45,12 +45,10 @@ const styles = (theme: Theme) => backgroundColor: fade(theme.palette.primary.main, 0.2) }, backgroundColor: "transparent" - } + }, + padding: 6 }, root: { - "& button": { - padding: 6 - }, color: theme.palette.text.secondary, flexShrink: 0, margin: `0 ${theme.spacing.unit * 2.5}px` diff --git a/src/components/VisibilityCard/VisibilityCard.tsx b/src/components/VisibilityCard/VisibilityCard.tsx index 5e7ab1a13..e546b3fa2 100644 --- a/src/components/VisibilityCard/VisibilityCard.tsx +++ b/src/components/VisibilityCard/VisibilityCard.tsx @@ -43,6 +43,7 @@ interface VisibilityCardProps extends WithStyles { errors: { [key: string]: string }; disabled?: boolean; onChange(event: any); + translate: string; } export const VisibilityCard = withStyles(styles, { @@ -54,7 +55,8 @@ export const VisibilityCard = withStyles(styles, { data: { isPublished, publicationDate }, errors, disabled, - onChange + onChange, + translate }: VisibilityCardProps) => { const intl = useIntl(); const [isPublicationDate, setPublicationDate] = React.useState( @@ -75,7 +77,8 @@ export const VisibilityCard = withStyles(styles, { defaultMessage: "since {date}" }, { - date: localizeDate(publicationDate) + date: localizeDate(publicationDate), + description: translate } ) : null @@ -89,7 +92,8 @@ export const VisibilityCard = withStyles(styles, { defaultMessage: "will be visible from {date}" }, { - date: localizeDate(publicationDate) + date: localizeDate(publicationDate), + description: translate } ) : null diff --git a/src/discounts/components/SaleInfo/SaleInfo.tsx b/src/discounts/components/SaleInfo/SaleInfo.tsx index 6b65a0105..ed1f7d25a 100644 --- a/src/discounts/components/SaleInfo/SaleInfo.tsx +++ b/src/discounts/components/SaleInfo/SaleInfo.tsx @@ -23,50 +23,36 @@ export interface SaleInfoProps { onChange: (event: React.ChangeEvent) => void; } -const styles = (theme: Theme) => - createStyles({ - root: { - display: "grid", - gridColumnGap: theme.spacing.unit * 2 + "px", - gridTemplateColumns: "1fr" - } - }); +const SaleInfo: React.FC = ({ + data, + disabled, + errors, + onChange +}) => { + const intl = useIntl(); -const SaleInfo = withStyles(styles, { - name: "SaleInfo" -})( - ({ - classes, - data, - disabled, - errors, - onChange - }: SaleInfoProps & WithStyles) => { - const intl = useIntl(); - - return ( - - + + + - - - - - ); - } -); + + + ); +}; SaleInfo.displayName = "SaleInfo"; export default SaleInfo; diff --git a/src/pages/components/PageDetailsPage/PageDetailsPage.tsx b/src/pages/components/PageDetailsPage/PageDetailsPage.tsx index e3f0695bc..9e9d9df73 100644 --- a/src/pages/components/PageDetailsPage/PageDetailsPage.tsx +++ b/src/pages/components/PageDetailsPage/PageDetailsPage.tsx @@ -124,6 +124,7 @@ const PageDetailsPage: React.StatelessComponent = ({ disabled={disabled} errors={formErrors} onChange={change} + translate="product" />
diff --git a/src/products/components/ProductCreatePage/ProductCreatePage.tsx b/src/products/components/ProductCreatePage/ProductCreatePage.tsx index 08788dcfd..79cee0883 100644 --- a/src/products/components/ProductCreatePage/ProductCreatePage.tsx +++ b/src/products/components/ProductCreatePage/ProductCreatePage.tsx @@ -281,6 +281,7 @@ export const ProductCreatePage: React.StatelessComponent< errors={errors} disabled={disabled} onChange={change} + translate="page" /> diff --git a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx index acd0f4c70..bf0729e41 100644 --- a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx +++ b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx @@ -291,6 +291,7 @@ export const ProductUpdatePage: React.FC = ({ errors={errors} disabled={disabled} onChange={change} + translate="product" />