Fix table cell padding
This commit is contained in:
parent
94eeca32f2
commit
585cd25332
22 changed files with 81 additions and 28 deletions
|
@ -46,7 +46,9 @@ const useStyles = makeStyles((theme: Theme) => ({
|
||||||
colSearchable: {
|
colSearchable: {
|
||||||
textAlign: "center"
|
textAlign: "center"
|
||||||
},
|
},
|
||||||
colSlug: {},
|
colSlug: {
|
||||||
|
paddingLeft: 0
|
||||||
|
},
|
||||||
colVisible: {
|
colVisible: {
|
||||||
textAlign: "center"
|
textAlign: "center"
|
||||||
},
|
},
|
||||||
|
|
|
@ -28,7 +28,9 @@ const styles = (theme: Theme) =>
|
||||||
colAvailability: {
|
colAvailability: {
|
||||||
width: 240
|
width: 240
|
||||||
},
|
},
|
||||||
colName: {},
|
colName: {
|
||||||
|
paddingLeft: 0
|
||||||
|
},
|
||||||
colProducts: {
|
colProducts: {
|
||||||
width: 240
|
width: 240
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,9 +35,10 @@ const styles = (theme: Theme) =>
|
||||||
"&:last-child": {
|
"&:last-child": {
|
||||||
paddingRight: 0
|
paddingRight: 0
|
||||||
},
|
},
|
||||||
width: 48 + theme.spacing.unit / 2
|
width: 76 + theme.spacing.unit / 2
|
||||||
},
|
},
|
||||||
colName: {
|
colName: {
|
||||||
|
paddingLeft: 0,
|
||||||
width: "auto"
|
width: "auto"
|
||||||
},
|
},
|
||||||
colNameLabel: {
|
colNameLabel: {
|
||||||
|
|
|
@ -45,6 +45,7 @@ const styles = createStyles({
|
||||||
overflowY: "scroll"
|
overflowY: "scroll"
|
||||||
},
|
},
|
||||||
wideCell: {
|
wideCell: {
|
||||||
|
paddingLeft: 0,
|
||||||
width: "100%"
|
width: "100%"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -59,7 +59,8 @@ const styles = (theme: Theme) =>
|
||||||
colName: {
|
colName: {
|
||||||
"&$colNameFixed": {
|
"&$colNameFixed": {
|
||||||
width: 250
|
width: 250
|
||||||
}
|
},
|
||||||
|
paddingLeft: 0
|
||||||
},
|
},
|
||||||
colNameFixed: {},
|
colNameFixed: {},
|
||||||
colNameHeader: {
|
colNameHeader: {
|
||||||
|
|
|
@ -21,7 +21,7 @@ const styles = (theme: Theme) =>
|
||||||
width: "100%"
|
width: "100%"
|
||||||
},
|
},
|
||||||
alignSelf: "flex-start",
|
alignSelf: "flex-start",
|
||||||
marginRight: theme.spacing.unit * 5.5
|
marginRight: 28
|
||||||
},
|
},
|
||||||
cardActionsExpanded: {
|
cardActionsExpanded: {
|
||||||
maxHeight: theme.spacing.unit * 6
|
maxHeight: theme.spacing.unit * 6
|
||||||
|
@ -41,7 +41,8 @@ const styles = (theme: Theme) =>
|
||||||
},
|
},
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
background: theme.palette.background.default,
|
background: theme.palette.background.default,
|
||||||
display: "flex"
|
display: "flex",
|
||||||
|
paddingLeft: theme.spacing.unit * 3
|
||||||
},
|
},
|
||||||
root: {
|
root: {
|
||||||
borderColor: theme.overrides.MuiCard.root.borderColor,
|
borderColor: theme.overrides.MuiCard.root.borderColor,
|
||||||
|
|
|
@ -31,7 +31,9 @@ const styles = (theme: Theme) =>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
colEmail: {},
|
colEmail: {},
|
||||||
colName: {},
|
colName: {
|
||||||
|
paddingLeft: 0
|
||||||
|
},
|
||||||
colOrders: {
|
colOrders: {
|
||||||
textAlign: "center"
|
textAlign: "center"
|
||||||
},
|
},
|
||||||
|
|
|
@ -42,9 +42,10 @@ const styles = (theme: Theme) =>
|
||||||
"&:last-child": {
|
"&:last-child": {
|
||||||
paddingRight: 0
|
paddingRight: 0
|
||||||
},
|
},
|
||||||
width: 48 + theme.spacing.unit / 2
|
width: 76 + theme.spacing.unit / 2
|
||||||
},
|
},
|
||||||
colName: {
|
colName: {
|
||||||
|
paddingLeft: 0,
|
||||||
width: "auto"
|
width: "auto"
|
||||||
},
|
},
|
||||||
colNameLabel: {
|
colNameLabel: {
|
||||||
|
|
|
@ -47,7 +47,9 @@ const styles = (theme: Theme) =>
|
||||||
colEnd: {
|
colEnd: {
|
||||||
textAlign: "right"
|
textAlign: "right"
|
||||||
},
|
},
|
||||||
colName: {},
|
colName: {
|
||||||
|
paddingLeft: 0
|
||||||
|
},
|
||||||
colStart: {
|
colStart: {
|
||||||
textAlign: "right"
|
textAlign: "right"
|
||||||
},
|
},
|
||||||
|
|
|
@ -56,7 +56,9 @@ const styles = (theme: Theme) =>
|
||||||
colMinSpent: {
|
colMinSpent: {
|
||||||
textAlign: "right"
|
textAlign: "right"
|
||||||
},
|
},
|
||||||
colName: {},
|
colName: {
|
||||||
|
paddingLeft: 0
|
||||||
|
},
|
||||||
colStart: {
|
colStart: {
|
||||||
textAlign: "right"
|
textAlign: "right"
|
||||||
},
|
},
|
||||||
|
|
|
@ -29,8 +29,12 @@ const styles = (theme: Theme) =>
|
||||||
},
|
},
|
||||||
avatarSpacing: {
|
avatarSpacing: {
|
||||||
paddingBottom: theme.spacing.unit * 2,
|
paddingBottom: theme.spacing.unit * 2,
|
||||||
|
paddingRight: theme.spacing.unit,
|
||||||
paddingTop: theme.spacing.unit * 2
|
paddingTop: theme.spacing.unit * 2
|
||||||
},
|
},
|
||||||
|
label: {
|
||||||
|
paddingLeft: 0
|
||||||
|
},
|
||||||
noProducts: {
|
noProducts: {
|
||||||
paddingBottom: 20,
|
paddingBottom: 20,
|
||||||
paddingTop: 20
|
paddingTop: 20
|
||||||
|
@ -81,7 +85,7 @@ export const HomeProductList = withStyles(styles, { name: "HomeProductList" })(
|
||||||
avatarProps={classes.avatarProps}
|
avatarProps={classes.avatarProps}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TableCell>
|
<TableCell className={classes.label}>
|
||||||
{variant ? (
|
{variant ? (
|
||||||
<>
|
<>
|
||||||
<Typography color={"primary"}>
|
<Typography color={"primary"}>
|
||||||
|
|
16
src/icons/ArrowSort.tsx
Normal file
16
src/icons/ArrowSort.tsx
Normal 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;
|
|
@ -39,7 +39,9 @@ const styles = (theme: Theme) =>
|
||||||
colItems: {
|
colItems: {
|
||||||
textAlign: "right"
|
textAlign: "right"
|
||||||
},
|
},
|
||||||
colTitle: {},
|
colTitle: {
|
||||||
|
paddingLeft: 0
|
||||||
|
},
|
||||||
row: {
|
row: {
|
||||||
cursor: "pointer"
|
cursor: "pointer"
|
||||||
}
|
}
|
||||||
|
@ -88,6 +90,7 @@ const MenuList = withStyles(styles, { name: "MenuList" })(
|
||||||
id="menuListItems"
|
id="menuListItems"
|
||||||
/>
|
/>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
<TableCell />
|
||||||
</TableHead>
|
</TableHead>
|
||||||
<TableFooter>
|
<TableFooter>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
|
|
|
@ -36,7 +36,7 @@ const styles = (theme: Theme) =>
|
||||||
"&:last-child": {
|
"&:last-child": {
|
||||||
paddingRight: 0
|
paddingRight: 0
|
||||||
},
|
},
|
||||||
width: 48 + theme.spacing.unit / 2
|
width: 76 + theme.spacing.unit / 2
|
||||||
},
|
},
|
||||||
colName: {
|
colName: {
|
||||||
width: "auto"
|
width: "auto"
|
||||||
|
|
|
@ -43,7 +43,9 @@ const styles = (theme: Theme) =>
|
||||||
},
|
},
|
||||||
colCustomer: {},
|
colCustomer: {},
|
||||||
colDate: {},
|
colDate: {},
|
||||||
colNumber: {},
|
colNumber: {
|
||||||
|
paddingLeft: 0
|
||||||
|
},
|
||||||
colTotal: {
|
colTotal: {
|
||||||
textAlign: "right"
|
textAlign: "right"
|
||||||
},
|
},
|
||||||
|
|
|
@ -39,6 +39,12 @@ const styles = (theme: Theme) =>
|
||||||
avatar: {
|
avatar: {
|
||||||
paddingLeft: 0
|
paddingLeft: 0
|
||||||
},
|
},
|
||||||
|
colName: {
|
||||||
|
paddingLeft: 0
|
||||||
|
},
|
||||||
|
colVariantCheckbox: {
|
||||||
|
padding: 0
|
||||||
|
},
|
||||||
content: {
|
content: {
|
||||||
overflowY: "scroll"
|
overflowY: "scroll"
|
||||||
},
|
},
|
||||||
|
@ -259,7 +265,7 @@ const OrderProductAddDialog = withStyles(styles, {
|
||||||
className={classes.avatar}
|
className={classes.avatar}
|
||||||
thumbnail={maybe(() => product.thumbnail.url)}
|
thumbnail={maybe(() => product.thumbnail.url)}
|
||||||
/>
|
/>
|
||||||
<TableCell className={classes.wideCell} colSpan={2}>
|
<TableCell className={classes.colName} colSpan={2}>
|
||||||
{maybe(() => product.name)}
|
{maybe(() => product.name)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
@ -267,7 +273,7 @@ const OrderProductAddDialog = withStyles(styles, {
|
||||||
(variant, variantIndex) => (
|
(variant, variantIndex) => (
|
||||||
<TableRow key={variant.id}>
|
<TableRow key={variant.id}>
|
||||||
<TableCell />
|
<TableCell />
|
||||||
<TableCell>
|
<TableCell className={classes.colVariantCheckbox}>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
className={classes.variantCheckbox}
|
className={classes.variantCheckbox}
|
||||||
checked={
|
checked={
|
||||||
|
@ -288,7 +294,7 @@ const OrderProductAddDialog = withStyles(styles, {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>
|
<TableCell className={classes.colName}>
|
||||||
<div>{variant.name}</div>
|
<div>{variant.name}</div>
|
||||||
<div className={classes.grayText}>
|
<div className={classes.grayText}>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
|
|
|
@ -25,6 +25,7 @@ const styles = createStyles({
|
||||||
cursor: "pointer"
|
cursor: "pointer"
|
||||||
},
|
},
|
||||||
colName: {
|
colName: {
|
||||||
|
paddingLeft: 0,
|
||||||
width: "auto"
|
width: "auto"
|
||||||
},
|
},
|
||||||
colNameLabel: {
|
colNameLabel: {
|
||||||
|
|
|
@ -38,7 +38,9 @@ const styles = (theme: Theme) =>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
colSlug: {},
|
colSlug: {},
|
||||||
colTitle: {},
|
colTitle: {
|
||||||
|
paddingLeft: 0
|
||||||
|
},
|
||||||
colVisibility: {},
|
colVisibility: {},
|
||||||
link: {
|
link: {
|
||||||
cursor: "pointer"
|
cursor: "pointer"
|
||||||
|
|
|
@ -33,7 +33,9 @@ const styles = (theme: Theme) =>
|
||||||
width: 300
|
width: 300
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
colName: {},
|
colName: {
|
||||||
|
paddingLeft: 0
|
||||||
|
},
|
||||||
colTax: {},
|
colTax: {},
|
||||||
colType: {},
|
colType: {},
|
||||||
link: {
|
link: {
|
||||||
|
|
|
@ -23,6 +23,10 @@ import { ProductVariantDetails_productVariant } from "../../types/ProductVariant
|
||||||
|
|
||||||
const styles = (theme: Theme) =>
|
const styles = (theme: Theme) =>
|
||||||
createStyles({
|
createStyles({
|
||||||
|
colName: {
|
||||||
|
paddingLeft: 0,
|
||||||
|
textAlign: [["left"], "!important"] as any
|
||||||
|
},
|
||||||
link: {
|
link: {
|
||||||
cursor: "pointer"
|
cursor: "pointer"
|
||||||
},
|
},
|
||||||
|
@ -37,9 +41,6 @@ const styles = (theme: Theme) =>
|
||||||
width: 2
|
width: 2
|
||||||
},
|
},
|
||||||
position: "relative"
|
position: "relative"
|
||||||
},
|
|
||||||
textLeft: {
|
|
||||||
textAlign: [["left"], "!important"] as any
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -92,7 +93,7 @@ const ProductVariantNavigation = withStyles(styles, {
|
||||||
fallbackThumbnail
|
fallbackThumbnail
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<TableCell className={classes.textLeft}>
|
<TableCell className={classes.colName}>
|
||||||
{variant ? variant.name || variant.sku : <Skeleton />}
|
{variant ? variant.name || variant.sku : <Skeleton />}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
@ -114,7 +115,7 @@ const ProductVariantNavigation = withStyles(styles, {
|
||||||
className={classes.tabActive}
|
className={classes.tabActive}
|
||||||
thumbnail={null}
|
thumbnail={null}
|
||||||
/>
|
/>
|
||||||
<TableCell className={classes.textLeft}>
|
<TableCell className={classes.colName}>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="New Variant"
|
defaultMessage="New Variant"
|
||||||
description="variant name"
|
description="variant name"
|
||||||
|
|
|
@ -45,7 +45,9 @@ const styles = (theme: Theme) =>
|
||||||
width: ICONBUTTON_SIZE + theme.spacing.unit / 2
|
width: ICONBUTTON_SIZE + theme.spacing.unit / 2
|
||||||
},
|
},
|
||||||
colCountries: {},
|
colCountries: {},
|
||||||
colName: {},
|
colName: {
|
||||||
|
paddingLeft: 0
|
||||||
|
},
|
||||||
row: {
|
row: {
|
||||||
cursor: "pointer"
|
cursor: "pointer"
|
||||||
}
|
}
|
||||||
|
|
|
@ -270,8 +270,7 @@ export default (colors: IThemeColors): Theme =>
|
||||||
paddingTop: 8
|
paddingTop: 8
|
||||||
},
|
},
|
||||||
head: {
|
head: {
|
||||||
fontSize: ".875rem",
|
fontSize: ".875rem"
|
||||||
fontWeight: 400
|
|
||||||
},
|
},
|
||||||
paddingCheckbox: {
|
paddingCheckbox: {
|
||||||
"&:first-child": {
|
"&:first-child": {
|
||||||
|
@ -292,7 +291,7 @@ export default (colors: IThemeColors): Theme =>
|
||||||
},
|
},
|
||||||
borderBottomColor: colors.paperBorder,
|
borderBottomColor: colors.paperBorder,
|
||||||
height: 56,
|
height: 56,
|
||||||
padding: "4px 24px 4px 0"
|
padding: "4px 24px"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
MuiTableRow: {
|
MuiTableRow: {
|
||||||
|
|
Loading…
Reference in a new issue