Fix table cell padding

This commit is contained in:
dominik-zeglen 2019-09-02 10:44:26 +02:00
parent 94eeca32f2
commit 585cd25332
22 changed files with 81 additions and 28 deletions

View file

@ -46,7 +46,9 @@ const useStyles = makeStyles((theme: Theme) => ({
colSearchable: {
textAlign: "center"
},
colSlug: {},
colSlug: {
paddingLeft: 0
},
colVisible: {
textAlign: "center"
},

View file

@ -28,7 +28,9 @@ const styles = (theme: Theme) =>
colAvailability: {
width: 240
},
colName: {},
colName: {
paddingLeft: 0
},
colProducts: {
width: 240
}

View file

@ -35,9 +35,10 @@ const styles = (theme: Theme) =>
"&:last-child": {
paddingRight: 0
},
width: 48 + theme.spacing.unit / 2
width: 76 + theme.spacing.unit / 2
},
colName: {
paddingLeft: 0,
width: "auto"
},
colNameLabel: {

View file

@ -45,6 +45,7 @@ const styles = createStyles({
overflowY: "scroll"
},
wideCell: {
paddingLeft: 0,
width: "100%"
}
});

View file

@ -59,7 +59,8 @@ const styles = (theme: Theme) =>
colName: {
"&$colNameFixed": {
width: 250
}
},
paddingLeft: 0
},
colNameFixed: {},
colNameHeader: {

View file

@ -21,7 +21,7 @@ const styles = (theme: Theme) =>
width: "100%"
},
alignSelf: "flex-start",
marginRight: theme.spacing.unit * 5.5
marginRight: 28
},
cardActionsExpanded: {
maxHeight: theme.spacing.unit * 6
@ -41,7 +41,8 @@ const styles = (theme: Theme) =>
},
alignItems: "center",
background: theme.palette.background.default,
display: "flex"
display: "flex",
paddingLeft: theme.spacing.unit * 3
},
root: {
borderColor: theme.overrides.MuiCard.root.borderColor,

View file

@ -31,7 +31,9 @@ const styles = (theme: Theme) =>
}
},
colEmail: {},
colName: {},
colName: {
paddingLeft: 0
},
colOrders: {
textAlign: "center"
},

View file

@ -42,9 +42,10 @@ const styles = (theme: Theme) =>
"&:last-child": {
paddingRight: 0
},
width: 48 + theme.spacing.unit / 2
width: 76 + theme.spacing.unit / 2
},
colName: {
paddingLeft: 0,
width: "auto"
},
colNameLabel: {

View file

@ -47,7 +47,9 @@ const styles = (theme: Theme) =>
colEnd: {
textAlign: "right"
},
colName: {},
colName: {
paddingLeft: 0
},
colStart: {
textAlign: "right"
},

View file

@ -56,7 +56,9 @@ const styles = (theme: Theme) =>
colMinSpent: {
textAlign: "right"
},
colName: {},
colName: {
paddingLeft: 0
},
colStart: {
textAlign: "right"
},

View file

@ -29,8 +29,12 @@ const styles = (theme: Theme) =>
},
avatarSpacing: {
paddingBottom: theme.spacing.unit * 2,
paddingRight: theme.spacing.unit,
paddingTop: theme.spacing.unit * 2
},
label: {
paddingLeft: 0
},
noProducts: {
paddingBottom: 20,
paddingTop: 20
@ -81,7 +85,7 @@ export const HomeProductList = withStyles(styles, { name: "HomeProductList" })(
avatarProps={classes.avatarProps}
/>
<TableCell>
<TableCell className={classes.label}>
{variant ? (
<>
<Typography color={"primary"}>

16
src/icons/ArrowSort.tsx Normal file
View file

@ -0,0 +1,16 @@
import createSvgIcon from "@material-ui/icons/utils/createSvgIcon";
import React from "react";
export const ArrowSort = createSvgIcon(
<>
<rect width="24" height="24" fill="transparent" />
<path
fillRule="evenodd"
clipRule="evenodd"
d="M11.0328 17.1401V4H12.9672V17.1401L14.6322 15.4751L16 16.8429L12 20.8429L8 16.8429L9.36782 15.4751L11.0328 17.1401Z"
fill="currentColor"
/>
</>
);
ArrowSort.displayName = "ArrowSort";
export default ArrowSort;

View file

@ -39,7 +39,9 @@ const styles = (theme: Theme) =>
colItems: {
textAlign: "right"
},
colTitle: {},
colTitle: {
paddingLeft: 0
},
row: {
cursor: "pointer"
}
@ -88,6 +90,7 @@ const MenuList = withStyles(styles, { name: "MenuList" })(
id="menuListItems"
/>
</TableCell>
<TableCell />
</TableHead>
<TableFooter>
<TableRow>

View file

@ -36,7 +36,7 @@ const styles = (theme: Theme) =>
"&:last-child": {
paddingRight: 0
},
width: 48 + theme.spacing.unit / 2
width: 76 + theme.spacing.unit / 2
},
colName: {
width: "auto"

View file

@ -43,7 +43,9 @@ const styles = (theme: Theme) =>
},
colCustomer: {},
colDate: {},
colNumber: {},
colNumber: {
paddingLeft: 0
},
colTotal: {
textAlign: "right"
},

View file

@ -39,6 +39,12 @@ const styles = (theme: Theme) =>
avatar: {
paddingLeft: 0
},
colName: {
paddingLeft: 0
},
colVariantCheckbox: {
padding: 0
},
content: {
overflowY: "scroll"
},
@ -259,7 +265,7 @@ const OrderProductAddDialog = withStyles(styles, {
className={classes.avatar}
thumbnail={maybe(() => product.thumbnail.url)}
/>
<TableCell className={classes.wideCell} colSpan={2}>
<TableCell className={classes.colName} colSpan={2}>
{maybe(() => product.name)}
</TableCell>
</TableRow>
@ -267,7 +273,7 @@ const OrderProductAddDialog = withStyles(styles, {
(variant, variantIndex) => (
<TableRow key={variant.id}>
<TableCell />
<TableCell>
<TableCell className={classes.colVariantCheckbox}>
<Checkbox
className={classes.variantCheckbox}
checked={
@ -288,7 +294,7 @@ const OrderProductAddDialog = withStyles(styles, {
}
/>
</TableCell>
<TableCell>
<TableCell className={classes.colName}>
<div>{variant.name}</div>
<div className={classes.grayText}>
<FormattedMessage

View file

@ -25,6 +25,7 @@ const styles = createStyles({
cursor: "pointer"
},
colName: {
paddingLeft: 0,
width: "auto"
},
colNameLabel: {

View file

@ -38,7 +38,9 @@ const styles = (theme: Theme) =>
}
},
colSlug: {},
colTitle: {},
colTitle: {
paddingLeft: 0
},
colVisibility: {},
link: {
cursor: "pointer"

View file

@ -33,7 +33,9 @@ const styles = (theme: Theme) =>
width: 300
}
},
colName: {},
colName: {
paddingLeft: 0
},
colTax: {},
colType: {},
link: {

View file

@ -23,6 +23,10 @@ import { ProductVariantDetails_productVariant } from "../../types/ProductVariant
const styles = (theme: Theme) =>
createStyles({
colName: {
paddingLeft: 0,
textAlign: [["left"], "!important"] as any
},
link: {
cursor: "pointer"
},
@ -37,9 +41,6 @@ const styles = (theme: Theme) =>
width: 2
},
position: "relative"
},
textLeft: {
textAlign: [["left"], "!important"] as any
}
});
@ -92,7 +93,7 @@ const ProductVariantNavigation = withStyles(styles, {
fallbackThumbnail
)}
/>
<TableCell className={classes.textLeft}>
<TableCell className={classes.colName}>
{variant ? variant.name || variant.sku : <Skeleton />}
</TableCell>
</TableRow>
@ -114,7 +115,7 @@ const ProductVariantNavigation = withStyles(styles, {
className={classes.tabActive}
thumbnail={null}
/>
<TableCell className={classes.textLeft}>
<TableCell className={classes.colName}>
<FormattedMessage
defaultMessage="New Variant"
description="variant name"

View file

@ -45,7 +45,9 @@ const styles = (theme: Theme) =>
width: ICONBUTTON_SIZE + theme.spacing.unit / 2
},
colCountries: {},
colName: {},
colName: {
paddingLeft: 0
},
row: {
cursor: "pointer"
}

View file

@ -270,8 +270,7 @@ export default (colors: IThemeColors): Theme =>
paddingTop: 8
},
head: {
fontSize: ".875rem",
fontWeight: 400
fontSize: ".875rem"
},
paddingCheckbox: {
"&:first-child": {
@ -292,7 +291,7 @@ export default (colors: IThemeColors): Theme =>
},
borderBottomColor: colors.paperBorder,
height: 56,
padding: "4px 24px 4px 0"
padding: "4px 24px"
}
},
MuiTableRow: {