Merge pull request #240 from mirumee/improve-mobile-appearance
Improve mobile appearance
This commit is contained in:
commit
9b459f70af
70 changed files with 33492 additions and 32614 deletions
|
@ -11,6 +11,7 @@ All notable, unreleased changes to this project will be documented in this file.
|
||||||
- Update customer's details page design - #248 by @dominik-zeglen
|
- Update customer's details page design - #248 by @dominik-zeglen
|
||||||
- Use Apollo Hooks - #254 by @dominik-zeglen
|
- Use Apollo Hooks - #254 by @dominik-zeglen
|
||||||
- Fix disappearing products description - #259 by @dominik-zeglen
|
- Fix disappearing products description - #259 by @dominik-zeglen
|
||||||
|
- Improve mobile appearance - #240 by @benekex2 and @dominik-zeglen
|
||||||
|
|
||||||
## 2.0.0
|
## 2.0.0
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -8,6 +7,7 @@ import React from "react";
|
||||||
import { FormattedMessage, useIntl } from "react-intl";
|
import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
import Checkbox from "@saleor/components/Checkbox";
|
import Checkbox from "@saleor/components/Checkbox";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import TableHead from "@saleor/components/TableHead";
|
import TableHead from "@saleor/components/TableHead";
|
||||||
import TablePagination from "@saleor/components/TablePagination";
|
import TablePagination from "@saleor/components/TablePagination";
|
||||||
|
@ -75,7 +75,7 @@ const AttributeList: React.FC<AttributeListProps> = ({
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead
|
<TableHead
|
||||||
colSpan={numberOfColumns}
|
colSpan={numberOfColumns}
|
||||||
selected={selected}
|
selected={selected}
|
||||||
|
@ -207,7 +207,7 @@ const AttributeList: React.FC<AttributeListProps> = ({
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
AttributeList.displayName = "AttributeList";
|
AttributeList.displayName = "AttributeList";
|
||||||
|
|
|
@ -2,7 +2,6 @@ import Button from "@material-ui/core/Button";
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import IconButton from "@material-ui/core/IconButton";
|
import IconButton from "@material-ui/core/IconButton";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableHead from "@material-ui/core/TableHead";
|
import TableHead from "@material-ui/core/TableHead";
|
||||||
import TableRow from "@material-ui/core/TableRow";
|
import TableRow from "@material-ui/core/TableRow";
|
||||||
|
@ -11,6 +10,7 @@ import React from "react";
|
||||||
import { FormattedMessage, useIntl } from "react-intl";
|
import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
import CardTitle from "@saleor/components/CardTitle";
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import {
|
import {
|
||||||
SortableTableBody,
|
SortableTableBody,
|
||||||
|
@ -80,7 +80,7 @@ const AttributeValues: React.FC<AttributeValuesProps> = ({
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell className={classes.columnDrag} />
|
<TableCell className={classes.columnDrag} />
|
||||||
|
@ -138,7 +138,7 @@ const AttributeValues: React.FC<AttributeValuesProps> = ({
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</SortableTableBody>
|
</SortableTableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -9,6 +8,7 @@ import { FormattedMessage } from "react-intl";
|
||||||
|
|
||||||
import { CategoryFragment } from "@saleor/categories/types/CategoryFragment";
|
import { CategoryFragment } from "@saleor/categories/types/CategoryFragment";
|
||||||
import Checkbox from "@saleor/components/Checkbox";
|
import Checkbox from "@saleor/components/Checkbox";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import TableHead from "@saleor/components/TableHead";
|
import TableHead from "@saleor/components/TableHead";
|
||||||
import TablePagination from "@saleor/components/TablePagination";
|
import TablePagination from "@saleor/components/TablePagination";
|
||||||
|
@ -73,7 +73,7 @@ const CategoryList: React.FC<CategoryListProps> = props => {
|
||||||
const classes = useStyles(props);
|
const classes = useStyles(props);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead
|
<TableHead
|
||||||
colSpan={numberOfColumns}
|
colSpan={numberOfColumns}
|
||||||
selected={selected}
|
selected={selected}
|
||||||
|
@ -174,7 +174,7 @@ const CategoryList: React.FC<CategoryListProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
import TableRow from "@material-ui/core/TableRow";
|
import TableRow from "@material-ui/core/TableRow";
|
||||||
import Checkbox from "@saleor/components/Checkbox";
|
import Checkbox from "@saleor/components/Checkbox";
|
||||||
import Money from "@saleor/components/Money";
|
import Money from "@saleor/components/Money";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import StatusLabel from "@saleor/components/StatusLabel";
|
import StatusLabel from "@saleor/components/StatusLabel";
|
||||||
import { FormattedMessage, useIntl } from "react-intl";
|
import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
@ -98,7 +98,7 @@ export const CategoryProductList: React.FC<
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classes.tableContainer}>
|
<div className={classes.tableContainer}>
|
||||||
<Table className={classes.table}>
|
<ResponsiveTable className={classes.table}>
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col />
|
<col />
|
||||||
<col className={classes.colName} />
|
<col className={classes.colName} />
|
||||||
|
@ -229,7 +229,7 @@ export const CategoryProductList: React.FC<
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -8,6 +7,7 @@ import React from "react";
|
||||||
import { FormattedMessage, useIntl } from "react-intl";
|
import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
import Checkbox from "@saleor/components/Checkbox";
|
import Checkbox from "@saleor/components/Checkbox";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import StatusLabel from "@saleor/components/StatusLabel";
|
import StatusLabel from "@saleor/components/StatusLabel";
|
||||||
import TableHead from "@saleor/components/TableHead";
|
import TableHead from "@saleor/components/TableHead";
|
||||||
|
@ -68,7 +68,7 @@ const CollectionList: React.FC<CollectionListProps> = props => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead
|
<TableHead
|
||||||
colSpan={numberOfColumns}
|
colSpan={numberOfColumns}
|
||||||
selected={selected}
|
selected={selected}
|
||||||
|
@ -174,7 +174,7 @@ const CollectionList: React.FC<CollectionListProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ import Button from "@material-ui/core/Button";
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import IconButton from "@material-ui/core/IconButton";
|
import IconButton from "@material-ui/core/IconButton";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -13,6 +12,7 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
import CardTitle from "@saleor/components/CardTitle";
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
import Checkbox from "@saleor/components/Checkbox";
|
import Checkbox from "@saleor/components/Checkbox";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import StatusLabel from "@saleor/components/StatusLabel";
|
import StatusLabel from "@saleor/components/StatusLabel";
|
||||||
import TableCellAvatar, {
|
import TableCellAvatar, {
|
||||||
|
@ -114,7 +114,7 @@ const CollectionProducts: React.FC<CollectionProductsProps> = props => {
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Table className={classes.table}>
|
<ResponsiveTable className={classes.table}>
|
||||||
<TableHead
|
<TableHead
|
||||||
colSpan={numberOfColumns}
|
colSpan={numberOfColumns}
|
||||||
selected={selected}
|
selected={selected}
|
||||||
|
@ -232,7 +232,7 @@ const CollectionProducts: React.FC<CollectionProductsProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -30,7 +30,10 @@ const useStyles = makeStyles(theme => ({
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
marginTop: theme.spacing(0.5),
|
marginTop: theme.spacing(0.5),
|
||||||
transition: theme.transitions.duration.standard + "ms"
|
transition: theme.transitions.duration.standard + "ms",
|
||||||
|
[theme.breakpoints.down("sm")]: {
|
||||||
|
display: "none"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
skeleton: {
|
skeleton: {
|
||||||
marginBottom: theme.spacing(2),
|
marginBottom: theme.spacing(2),
|
||||||
|
@ -40,9 +43,13 @@ const useStyles = makeStyles(theme => ({
|
||||||
color: "inherit",
|
color: "inherit",
|
||||||
flex: 1,
|
flex: 1,
|
||||||
marginLeft: theme.spacing(),
|
marginLeft: theme.spacing(),
|
||||||
textTransform: "uppercase"
|
textTransform: "uppercase",
|
||||||
|
[theme.breakpoints.down("sm")]: {
|
||||||
|
display: "none"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const AppHeader: React.FC<AppHeaderProps> = props => {
|
const AppHeader: React.FC<AppHeaderProps> = props => {
|
||||||
const { children, onBack } = props;
|
const { children, onBack } = props;
|
||||||
|
|
||||||
|
|
|
@ -64,6 +64,12 @@ const useStyles = makeStyles(
|
||||||
marginLeft: theme.spacing(2),
|
marginLeft: theme.spacing(2),
|
||||||
transition: theme.transitions.duration.standard + "ms"
|
transition: theme.transitions.duration.standard + "ms"
|
||||||
},
|
},
|
||||||
|
avatar: {
|
||||||
|
"&&": {
|
||||||
|
height: 32,
|
||||||
|
width: 32
|
||||||
|
}
|
||||||
|
},
|
||||||
content: {
|
content: {
|
||||||
[theme.breakpoints.down("sm")]: {
|
[theme.breakpoints.down("sm")]: {
|
||||||
paddingLeft: 0
|
paddingLeft: 0
|
||||||
|
@ -79,9 +85,16 @@ const useStyles = makeStyles(
|
||||||
paddingLeft: drawerWidth
|
paddingLeft: drawerWidth
|
||||||
},
|
},
|
||||||
darkThemeSwitch: {
|
darkThemeSwitch: {
|
||||||
|
[theme.breakpoints.down("sm")]: {
|
||||||
|
marginRight: -theme.spacing(1.5)
|
||||||
|
},
|
||||||
marginRight: theme.spacing(2)
|
marginRight: theme.spacing(2)
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
|
[theme.breakpoints.down("sm")]: {
|
||||||
|
height: 88,
|
||||||
|
marginBottom: 0
|
||||||
|
},
|
||||||
display: "flex",
|
display: "flex",
|
||||||
height: 40,
|
height: 40,
|
||||||
marginBottom: theme.spacing(3)
|
marginBottom: theme.spacing(3)
|
||||||
|
@ -179,6 +192,9 @@ const useStyles = makeStyles(
|
||||||
[theme.breakpoints.up("md")]: {
|
[theme.breakpoints.up("md")]: {
|
||||||
display: "none"
|
display: "none"
|
||||||
},
|
},
|
||||||
|
[theme.breakpoints.down("sm")]: {
|
||||||
|
left: 0
|
||||||
|
},
|
||||||
background: theme.palette.background.paper,
|
background: theme.palette.background.paper,
|
||||||
borderRadius: "50%",
|
borderRadius: "50%",
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
|
@ -239,12 +255,20 @@ const useStyles = makeStyles(
|
||||||
flex: 1
|
flex: 1
|
||||||
},
|
},
|
||||||
userBar: {
|
userBar: {
|
||||||
|
[theme.breakpoints.down("sm")]: {
|
||||||
|
alignItems: "flex-end",
|
||||||
|
flexDirection: "column-reverse",
|
||||||
|
overflow: "hidden"
|
||||||
|
},
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
display: "flex"
|
display: "flex"
|
||||||
},
|
},
|
||||||
userChip: {
|
userChip: {
|
||||||
backgroundColor: theme.palette.background.paper,
|
backgroundColor: theme.palette.background.paper,
|
||||||
color: theme.palette.text.primary
|
borderRadius: 24,
|
||||||
|
color: theme.palette.text.primary,
|
||||||
|
height: 40,
|
||||||
|
padding: theme.spacing(0.5)
|
||||||
},
|
},
|
||||||
userMenuContainer: {
|
userMenuContainer: {
|
||||||
position: "relative"
|
position: "relative"
|
||||||
|
@ -415,6 +439,9 @@ const AppLayout: React.FC<AppLayoutProps> = ({ children }) => {
|
||||||
<Avatar alt="user" src={user.avatar.url} />
|
<Avatar alt="user" src={user.avatar.url} />
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
classes={{
|
||||||
|
avatar: classes.avatar
|
||||||
|
}}
|
||||||
className={classes.userChip}
|
className={classes.userChip}
|
||||||
label={
|
label={
|
||||||
<>
|
<>
|
||||||
|
@ -433,7 +460,6 @@ const AppLayout: React.FC<AppLayoutProps> = ({ children }) => {
|
||||||
open={isMenuOpened}
|
open={isMenuOpened}
|
||||||
anchorEl={anchor.current}
|
anchorEl={anchor.current}
|
||||||
transition
|
transition
|
||||||
disablePortal
|
|
||||||
placement="bottom-end"
|
placement="bottom-end"
|
||||||
>
|
>
|
||||||
{({ TransitionProps, placement }) => (
|
{({ TransitionProps, placement }) => (
|
||||||
|
|
|
@ -101,7 +101,7 @@ const useStyles = makeStyles(theme => ({
|
||||||
content: "''",
|
content: "''",
|
||||||
height: 0,
|
height: 0,
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
right: -35,
|
right: -30,
|
||||||
top: 15,
|
top: 15,
|
||||||
width: 0
|
width: 0
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,7 +8,7 @@ import SVG from "react-inlinesvg";
|
||||||
import menuArrowIcon from "@assets/images/menu-arrow-icon.svg";
|
import menuArrowIcon from "@assets/images/menu-arrow-icon.svg";
|
||||||
import useTheme from "@saleor/hooks/useTheme";
|
import useTheme from "@saleor/hooks/useTheme";
|
||||||
import { createHref } from "@saleor/misc";
|
import { createHref } from "@saleor/misc";
|
||||||
import { drawerWidthExpanded } from "./consts";
|
import { drawerNestedMenuWidth, drawerWidthExpandedMobile } from "./consts";
|
||||||
import { IActiveSubMenu } from "./MenuList";
|
import { IActiveSubMenu } from "./MenuList";
|
||||||
import { IMenuItem } from "./menuStructure";
|
import { IMenuItem } from "./menuStructure";
|
||||||
|
|
||||||
|
@ -20,15 +20,15 @@ const useStyles = makeStyles(theme => ({
|
||||||
right: 0,
|
right: 0,
|
||||||
top: 0,
|
top: 0,
|
||||||
transition: `right ${theme.transitions.duration.shorter}ms ease`,
|
transition: `right ${theme.transitions.duration.shorter}ms ease`,
|
||||||
width: 300,
|
width: drawerNestedMenuWidth,
|
||||||
zIndex: -1
|
zIndex: -1
|
||||||
},
|
},
|
||||||
menuListNestedClose: {
|
menuListNestedClose: {
|
||||||
"& svg": {
|
"& svg": {
|
||||||
fill: theme.palette.primary.main,
|
fill: theme.palette.primary.main,
|
||||||
left: 7,
|
left: 11,
|
||||||
position: "relative",
|
position: "relative",
|
||||||
top: -2
|
top: 1
|
||||||
},
|
},
|
||||||
border: `solid 1px #EAEAEA`,
|
border: `solid 1px #EAEAEA`,
|
||||||
borderRadius: "100%",
|
borderRadius: "100%",
|
||||||
|
@ -71,10 +71,11 @@ const useStyles = makeStyles(theme => ({
|
||||||
menuListNestedOpen: {
|
menuListNestedOpen: {
|
||||||
[theme.breakpoints.down("sm")]: {
|
[theme.breakpoints.down("sm")]: {
|
||||||
right: 0,
|
right: 0,
|
||||||
width: drawerWidthExpanded,
|
width: drawerWidthExpandedMobile,
|
||||||
zIndex: 2
|
zIndex: 2
|
||||||
},
|
},
|
||||||
right: -300,
|
right: -drawerNestedMenuWidth,
|
||||||
|
width: drawerNestedMenuWidth,
|
||||||
zIndex: -1
|
zIndex: -1
|
||||||
},
|
},
|
||||||
subHeader: {
|
subHeader: {
|
||||||
|
|
|
@ -2,7 +2,11 @@ import Drawer from "@material-ui/core/Drawer";
|
||||||
import Hidden from "@material-ui/core/Hidden";
|
import Hidden from "@material-ui/core/Hidden";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { drawerWidth, drawerWidthExpanded } from "./consts";
|
import {
|
||||||
|
drawerWidth,
|
||||||
|
drawerWidthExpanded,
|
||||||
|
drawerWidthExpandedMobile
|
||||||
|
} from "./consts";
|
||||||
|
|
||||||
const useStyles = makeStyles(
|
const useStyles = makeStyles(
|
||||||
theme => ({
|
theme => ({
|
||||||
|
@ -22,7 +26,7 @@ const useStyles = makeStyles(
|
||||||
width: drawerWidth
|
width: drawerWidth
|
||||||
},
|
},
|
||||||
drawerMobile: {
|
drawerMobile: {
|
||||||
width: drawerWidthExpanded
|
width: drawerWidthExpandedMobile
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
{ name: "ResponsiveDrawer" }
|
{ name: "ResponsiveDrawer" }
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
export const drawerWidthExpanded = 210;
|
export const drawerWidthExpanded = 210;
|
||||||
|
export const drawerWidthExpandedMobile = 250;
|
||||||
export const drawerWidth = 80;
|
export const drawerWidth = 80;
|
||||||
|
export const drawerNestedMenuWidth = 300;
|
||||||
export const navigationBarHeight = 64;
|
export const navigationBarHeight = 64;
|
||||||
export const appLoaderHeight = 4;
|
export const appLoaderHeight = 4;
|
||||||
|
|
|
@ -5,7 +5,6 @@ import DialogActions from "@material-ui/core/DialogActions";
|
||||||
import DialogContent from "@material-ui/core/DialogContent";
|
import DialogContent from "@material-ui/core/DialogContent";
|
||||||
import DialogTitle from "@material-ui/core/DialogTitle";
|
import DialogTitle from "@material-ui/core/DialogTitle";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableRow from "@material-ui/core/TableRow";
|
import TableRow from "@material-ui/core/TableRow";
|
||||||
|
@ -17,6 +16,7 @@ import ConfirmButton, {
|
||||||
ConfirmButtonTransitionState
|
ConfirmButtonTransitionState
|
||||||
} from "@saleor/components/ConfirmButton";
|
} from "@saleor/components/ConfirmButton";
|
||||||
import FormSpacer from "@saleor/components/FormSpacer";
|
import FormSpacer from "@saleor/components/FormSpacer";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import useSearchQuery from "@saleor/hooks/useSearchQuery";
|
import useSearchQuery from "@saleor/hooks/useSearchQuery";
|
||||||
import { buttonMessages } from "@saleor/intl";
|
import { buttonMessages } from "@saleor/intl";
|
||||||
import { SearchCategories_search_edges_node } from "../../containers/SearchCategories/types/SearchCategories";
|
import { SearchCategories_search_edges_node } from "../../containers/SearchCategories/types/SearchCategories";
|
||||||
|
@ -123,7 +123,7 @@ const AssignCategoriesDialog: React.FC<AssignCategoriesDialogProps> = props => {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<FormSpacer />
|
<FormSpacer />
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{categories &&
|
{categories &&
|
||||||
categories.map(category => {
|
categories.map(category => {
|
||||||
|
@ -156,7 +156,7 @@ const AssignCategoriesDialog: React.FC<AssignCategoriesDialogProps> = props => {
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
<Button onClick={onClose}>
|
<Button onClick={onClose}>
|
||||||
|
|
|
@ -5,7 +5,6 @@ import DialogActions from "@material-ui/core/DialogActions";
|
||||||
import DialogContent from "@material-ui/core/DialogContent";
|
import DialogContent from "@material-ui/core/DialogContent";
|
||||||
import DialogTitle from "@material-ui/core/DialogTitle";
|
import DialogTitle from "@material-ui/core/DialogTitle";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableRow from "@material-ui/core/TableRow";
|
import TableRow from "@material-ui/core/TableRow";
|
||||||
|
@ -13,6 +12,7 @@ import TextField from "@material-ui/core/TextField";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { FormattedMessage, useIntl } from "react-intl";
|
import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import useSearchQuery from "@saleor/hooks/useSearchQuery";
|
import useSearchQuery from "@saleor/hooks/useSearchQuery";
|
||||||
import { buttonMessages } from "@saleor/intl";
|
import { buttonMessages } from "@saleor/intl";
|
||||||
import { SearchCollections_search_edges_node } from "../../containers/SearchCollections/types/SearchCollections";
|
import { SearchCollections_search_edges_node } from "../../containers/SearchCollections/types/SearchCollections";
|
||||||
|
@ -123,7 +123,7 @@ const AssignCollectionDialog: React.FC<AssignCollectionDialogProps> = props => {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<FormSpacer />
|
<FormSpacer />
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{collections &&
|
{collections &&
|
||||||
collections.map(collection => {
|
collections.map(collection => {
|
||||||
|
@ -156,7 +156,7 @@ const AssignCollectionDialog: React.FC<AssignCollectionDialogProps> = props => {
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
<Button onClick={onClose}>
|
<Button onClick={onClose}>
|
||||||
|
|
|
@ -5,7 +5,6 @@ import DialogActions from "@material-ui/core/DialogActions";
|
||||||
import DialogContent from "@material-ui/core/DialogContent";
|
import DialogContent from "@material-ui/core/DialogContent";
|
||||||
import DialogTitle from "@material-ui/core/DialogTitle";
|
import DialogTitle from "@material-ui/core/DialogTitle";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableRow from "@material-ui/core/TableRow";
|
import TableRow from "@material-ui/core/TableRow";
|
||||||
|
@ -17,6 +16,7 @@ import ConfirmButton, {
|
||||||
ConfirmButtonTransitionState
|
ConfirmButtonTransitionState
|
||||||
} from "@saleor/components/ConfirmButton";
|
} from "@saleor/components/ConfirmButton";
|
||||||
import FormSpacer from "@saleor/components/FormSpacer";
|
import FormSpacer from "@saleor/components/FormSpacer";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import TableCellAvatar from "@saleor/components/TableCellAvatar";
|
import TableCellAvatar from "@saleor/components/TableCellAvatar";
|
||||||
import useSearchQuery from "@saleor/hooks/useSearchQuery";
|
import useSearchQuery from "@saleor/hooks/useSearchQuery";
|
||||||
import { buttonMessages } from "@saleor/intl";
|
import { buttonMessages } from "@saleor/intl";
|
||||||
|
@ -131,7 +131,7 @@ const AssignProductDialog: React.FC<AssignProductDialogProps> = props => {
|
||||||
/>
|
/>
|
||||||
<FormSpacer />
|
<FormSpacer />
|
||||||
<div className={classes.scrollArea}>
|
<div className={classes.scrollArea}>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{products &&
|
{products &&
|
||||||
products.map(product => {
|
products.map(product => {
|
||||||
|
@ -168,7 +168,7 @@ const AssignProductDialog: React.FC<AssignProductDialogProps> = props => {
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</div>
|
</div>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
|
|
|
@ -28,8 +28,8 @@ const useStyles = makeStyles(
|
||||||
theme => ({
|
theme => ({
|
||||||
popper: {
|
popper: {
|
||||||
boxShadow: `0px 5px 10px 0 ${fade(theme.palette.common.black, 0.05)}`,
|
boxShadow: `0px 5px 10px 0 ${fade(theme.palette.common.black, 0.05)}`,
|
||||||
marginTop: theme.spacing(2),
|
marginTop: theme.spacing(1),
|
||||||
zIndex: 1
|
zIndex: 2
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,6 +43,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
marginRight: theme.spacing(2)
|
marginRight: theme.spacing(2)
|
||||||
},
|
},
|
||||||
content: {
|
content: {
|
||||||
|
[theme.breakpoints.down("sm")]: {
|
||||||
|
gridTemplateColumns: "repeat(2, 1fr)"
|
||||||
|
},
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gridColumnGap: theme.spacing(3),
|
gridColumnGap: theme.spacing(3),
|
||||||
gridTemplateColumns: "repeat(3, 1fr)",
|
gridTemplateColumns: "repeat(3, 1fr)",
|
||||||
|
@ -66,6 +69,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
},
|
},
|
||||||
root: {
|
root: {
|
||||||
boxShadow: "0px 4px 4px rgba(0, 0, 0, 0.25)"
|
boxShadow: "0px 4px 4px rgba(0, 0, 0, 0.25)"
|
||||||
|
},
|
||||||
|
titleContainer: {
|
||||||
|
padding: theme.spacing(1.5, 3.5)
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -94,7 +100,7 @@ const ColumnPickerContent: React.FC<ColumnPickerContentProps> = props => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card className={classes.root}>
|
<Card className={classes.root}>
|
||||||
<CardContent>
|
<CardContent className={classes.titleContainer}>
|
||||||
<Typography color="textSecondary">
|
<Typography color="textSecondary">
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="{numberOfSelected} columns selected out of {numberOfTotal}"
|
defaultMessage="{numberOfSelected} columns selected out of {numberOfTotal}"
|
||||||
|
|
|
@ -2,19 +2,24 @@ import { makeStyles } from "@material-ui/core/styles";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
root: {
|
theme => ({
|
||||||
[theme.breakpoints.up("lg")]: {
|
root: {
|
||||||
marginLeft: "auto",
|
[theme.breakpoints.up("lg")]: {
|
||||||
marginRight: "auto",
|
marginLeft: "auto",
|
||||||
maxWidth: theme.breakpoints.width("lg")
|
marginRight: "auto",
|
||||||
},
|
maxWidth: theme.breakpoints.width("lg")
|
||||||
[theme.breakpoints.up("sm")]: {
|
},
|
||||||
padding: theme.spacing(0, 3)
|
[theme.breakpoints.up("sm")]: {
|
||||||
},
|
padding: theme.spacing(0, 3)
|
||||||
padding: theme.spacing(0, 1)
|
},
|
||||||
|
padding: theme.spacing(0, 1)
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
name: "Container"
|
||||||
}
|
}
|
||||||
}));
|
);
|
||||||
|
|
||||||
interface ContainerProps {
|
interface ContainerProps {
|
||||||
className?: string;
|
className?: string;
|
||||||
|
|
|
@ -3,7 +3,6 @@ import Card from "@material-ui/core/Card";
|
||||||
import CardContent from "@material-ui/core/CardContent";
|
import CardContent from "@material-ui/core/CardContent";
|
||||||
import IconButton from "@material-ui/core/IconButton";
|
import IconButton from "@material-ui/core/IconButton";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableRow from "@material-ui/core/TableRow";
|
import TableRow from "@material-ui/core/TableRow";
|
||||||
|
@ -14,6 +13,7 @@ import React from "react";
|
||||||
import { FormattedMessage } from "react-intl";
|
import { FormattedMessage } from "react-intl";
|
||||||
|
|
||||||
import CardTitle from "@saleor/components/CardTitle";
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import { maybe, renderCollection } from "../../misc";
|
import { maybe, renderCollection } from "../../misc";
|
||||||
import { CountryFragment } from "../../taxes/types/CountryFragment";
|
import { CountryFragment } from "../../taxes/types/CountryFragment";
|
||||||
|
@ -100,7 +100,7 @@ const CountryList: React.FC<CountryListProps> = props => {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<CardContent className={classes.root}>
|
<CardContent className={classes.root}>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
<TableRow className={classes.pointer} onClick={toggleCollapse}>
|
<TableRow className={classes.pointer} onClick={toggleCollapse}>
|
||||||
<TableCell
|
<TableCell
|
||||||
|
@ -173,7 +173,7 @@ const CountryList: React.FC<CountryListProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,48 +2,68 @@ import { makeStyles } from "@material-ui/core/styles";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
action: {
|
theme => ({
|
||||||
flex: "0 0 auto"
|
action: {
|
||||||
},
|
flex: "0 0 auto",
|
||||||
grid: {
|
[theme.breakpoints.down("sm")]: {
|
||||||
padding: theme.spacing(2)
|
marginTop: theme.spacing()
|
||||||
},
|
}
|
||||||
menuButton: {
|
},
|
||||||
flex: "0 0 auto",
|
block: {
|
||||||
marginLeft: -theme.spacing(2),
|
[theme.breakpoints.down("sm")]: {
|
||||||
marginRight: theme.spacing(3),
|
"&&": {
|
||||||
marginTop: -theme.spacing(2)
|
display: "block"
|
||||||
},
|
}
|
||||||
root: {
|
}
|
||||||
alignItems: "center",
|
},
|
||||||
display: "flex",
|
grid: {
|
||||||
marginBottom: theme.spacing(3)
|
padding: theme.spacing(2)
|
||||||
},
|
},
|
||||||
subtitle: {
|
menuButton: {
|
||||||
alignItems: "center",
|
flex: "0 0 auto",
|
||||||
display: "flex",
|
marginLeft: -theme.spacing(2),
|
||||||
marginBottom: theme.spacing(2)
|
marginRight: theme.spacing(3),
|
||||||
},
|
marginTop: -theme.spacing(2)
|
||||||
title: {
|
},
|
||||||
flex: 1,
|
root: {
|
||||||
paddingBottom: theme.spacing(2)
|
alignItems: "center",
|
||||||
|
display: "flex",
|
||||||
|
marginBottom: theme.spacing(3)
|
||||||
|
},
|
||||||
|
subtitle: {
|
||||||
|
alignItems: "center",
|
||||||
|
display: "flex",
|
||||||
|
marginBottom: theme.spacing(2)
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
flex: 1,
|
||||||
|
paddingBottom: theme.spacing(2)
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
name: "ExtendedPageHeader"
|
||||||
}
|
}
|
||||||
}));
|
);
|
||||||
|
|
||||||
interface ExtendedPageHeaderProps {
|
interface ExtendedPageHeaderProps {
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
className?: string;
|
className?: string;
|
||||||
|
inline?: boolean;
|
||||||
title?: React.ReactNode;
|
title?: React.ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ExtendedPageHeader: React.FC<ExtendedPageHeaderProps> = props => {
|
const ExtendedPageHeader: React.FC<ExtendedPageHeaderProps> = props => {
|
||||||
const { children, className, title } = props;
|
const { children, className, inline, title } = props;
|
||||||
|
|
||||||
const classes = useStyles(props);
|
const classes = useStyles(props);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classNames(classes.root, className)}>
|
<div
|
||||||
|
className={classNames(classes.root, className, {
|
||||||
|
[classes.block]: !inline
|
||||||
|
})}
|
||||||
|
>
|
||||||
{title}
|
{title}
|
||||||
<div className={classes.action}>{children}</div>
|
<div className={classes.action}>{children}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -10,26 +10,33 @@ const useStyles = makeStyles(theme => ({
|
||||||
display: "flex"
|
display: "flex"
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
|
[theme.breakpoints.down("sm")]: {
|
||||||
|
fontSize: 20,
|
||||||
|
marginTop: theme.spacing(2),
|
||||||
|
padding: 0
|
||||||
|
},
|
||||||
|
alignSelf: "flex-start",
|
||||||
flex: 1,
|
flex: 1,
|
||||||
fontSize: 24,
|
fontSize: 24
|
||||||
paddingBottom: theme.spacing(2)
|
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
interface PageHeaderProps {
|
interface PageHeaderProps {
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
className?: string;
|
className?: string;
|
||||||
|
inline?: boolean;
|
||||||
title?: string;
|
title?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const PageHeader: React.FC<PageHeaderProps> = props => {
|
const PageHeader: React.FC<PageHeaderProps> = props => {
|
||||||
const { children, className, title } = props;
|
const { children, className, inline, title } = props;
|
||||||
|
|
||||||
const classes = useStyles(props);
|
const classes = useStyles(props);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ExtendedPageHeader
|
<ExtendedPageHeader
|
||||||
className={className}
|
className={className}
|
||||||
|
inline={inline}
|
||||||
title={
|
title={
|
||||||
<Typography className={classes.title} variant="h5">
|
<Typography className={classes.title} variant="h5">
|
||||||
{title !== undefined ? title : <Skeleton style={{ width: "10em" }} />}
|
{title !== undefined ? title : <Skeleton style={{ width: "10em" }} />}
|
||||||
|
|
44
src/components/ResponsiveTable/ResponsiveTable.tsx
Normal file
44
src/components/ResponsiveTable/ResponsiveTable.tsx
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
import makeStyles from "@material-ui/core/styles/makeStyles";
|
||||||
|
import Table from "@material-ui/core/Table";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
|
root: {
|
||||||
|
[theme.breakpoints.up("sm")]: {
|
||||||
|
"& table": {
|
||||||
|
tableLayout: "fixed"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"& table": {
|
||||||
|
tableLayout: "auto"
|
||||||
|
},
|
||||||
|
overflowX: "auto",
|
||||||
|
width: "100%"
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
name: "ResponsiveTable"
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
interface ResponsiveTableProps {
|
||||||
|
children: React.ReactNode | React.ReactNodeArray;
|
||||||
|
className?: string;
|
||||||
|
key?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const ResponsiveTable: React.FC<ResponsiveTableProps> = props => {
|
||||||
|
const { children, className } = props;
|
||||||
|
|
||||||
|
const classes = useStyles(props);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={classes.root}>
|
||||||
|
<Table className={className}>{children}</Table>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
ResponsiveTable.displayName = "ResponsiveTable";
|
||||||
|
export default ResponsiveTable;
|
2
src/components/ResponsiveTable/index.ts
Normal file
2
src/components/ResponsiveTable/index.ts
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
export { default } from "./ResponsiveTable";
|
||||||
|
export * from "./ResponsiveTable";
|
|
@ -1,5 +1,4 @@
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableHead from "@material-ui/core/TableHead";
|
import TableHead from "@material-ui/core/TableHead";
|
||||||
|
@ -7,6 +6,7 @@ import TableRow from "@material-ui/core/TableRow";
|
||||||
import { storiesOf } from "@storybook/react";
|
import { storiesOf } from "@storybook/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Decorator from "../../storybook/Decorator";
|
import Decorator from "../../storybook/Decorator";
|
||||||
import TableCellHeader, {
|
import TableCellHeader, {
|
||||||
TableCellHeaderArrowDirection
|
TableCellHeaderArrowDirection
|
||||||
|
@ -25,7 +25,7 @@ const Story: React.FC<StoryProps> = ({
|
||||||
onHeaderClick = () => undefined
|
onHeaderClick = () => undefined
|
||||||
}) => (
|
}) => (
|
||||||
<Card style={{ margin: "auto", width: 400 }}>
|
<Card style={{ margin: "auto", width: 400 }}>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCellHeader
|
<TableCellHeader
|
||||||
|
@ -49,7 +49,7 @@ const Story: React.FC<StoryProps> = ({
|
||||||
<TableCell>Juice</TableCell>
|
<TableCell>Juice</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
const InteractiveStory: React.FC = () => {
|
const InteractiveStory: React.FC = () => {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { MuiThemeProvider } from "@material-ui/core/styles";
|
import { MuiThemeProvider } from "@material-ui/core/styles";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import Helmet from "react-helmet";
|
||||||
|
|
||||||
import Baseline from "../../Baseline";
|
import Baseline from "../../Baseline";
|
||||||
import createTheme from "../../theme";
|
import createTheme from "../../theme";
|
||||||
|
@ -27,6 +28,8 @@ const ThemeProvider: React.FC<ThemeProviderProps> = ({
|
||||||
localStorage.setItem("theme", (!isDark).toString());
|
localStorage.setItem("theme", (!isDark).toString());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const theme = createTheme(isDark ? dark : light);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ThemeContext.Provider
|
<ThemeContext.Provider
|
||||||
value={{
|
value={{
|
||||||
|
@ -34,7 +37,10 @@ const ThemeProvider: React.FC<ThemeProviderProps> = ({
|
||||||
toggleTheme
|
toggleTheme
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<MuiThemeProvider theme={createTheme(isDark ? dark : light)}>
|
<Helmet>
|
||||||
|
<meta name="theme-color" content={theme.palette.background.default} />
|
||||||
|
</Helmet>
|
||||||
|
<MuiThemeProvider theme={theme}>
|
||||||
<Baseline />
|
<Baseline />
|
||||||
{children}
|
{children}
|
||||||
</MuiThemeProvider>
|
</MuiThemeProvider>
|
||||||
|
|
|
@ -61,6 +61,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
paddingTop: theme.spacing(3)
|
paddingTop: theme.spacing(3)
|
||||||
},
|
},
|
||||||
configurationItem: {
|
configurationItem: {
|
||||||
|
[theme.breakpoints.down("md")]: {
|
||||||
|
gridTemplateColumns: "1fr"
|
||||||
|
},
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gridColumnGap: theme.spacing(4),
|
gridColumnGap: theme.spacing(4),
|
||||||
gridTemplateColumns: "1fr 1fr"
|
gridTemplateColumns: "1fr 1fr"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -8,6 +7,7 @@ import React from "react";
|
||||||
import { FormattedMessage } from "react-intl";
|
import { FormattedMessage } from "react-intl";
|
||||||
|
|
||||||
import Checkbox from "@saleor/components/Checkbox";
|
import Checkbox from "@saleor/components/Checkbox";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import TableHead from "@saleor/components/TableHead";
|
import TableHead from "@saleor/components/TableHead";
|
||||||
import TablePagination from "@saleor/components/TablePagination";
|
import TablePagination from "@saleor/components/TablePagination";
|
||||||
|
@ -61,7 +61,7 @@ const CustomerList: React.FC<CustomerListProps> = props => {
|
||||||
const classes = useStyles(props);
|
const classes = useStyles(props);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead
|
<TableHead
|
||||||
colSpan={numberOfColumns}
|
colSpan={numberOfColumns}
|
||||||
selected={selected}
|
selected={selected}
|
||||||
|
@ -141,7 +141,7 @@ const CustomerList: React.FC<CustomerListProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
CustomerList.displayName = "CustomerList";
|
CustomerList.displayName = "CustomerList";
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import Button from "@material-ui/core/Button";
|
import Button from "@material-ui/core/Button";
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableHead from "@material-ui/core/TableHead";
|
import TableHead from "@material-ui/core/TableHead";
|
||||||
|
@ -12,6 +11,7 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||||
import CardTitle from "@saleor/components/CardTitle";
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
import { DateTime } from "@saleor/components/Date";
|
import { DateTime } from "@saleor/components/Date";
|
||||||
import Money from "@saleor/components/Money";
|
import Money from "@saleor/components/Money";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import StatusLabel from "@saleor/components/StatusLabel";
|
import StatusLabel from "@saleor/components/StatusLabel";
|
||||||
import { maybe, renderCollection, transformPaymentStatus } from "../../../misc";
|
import { maybe, renderCollection, transformPaymentStatus } from "../../../misc";
|
||||||
|
@ -60,7 +60,7 @@ const CustomerOrders: React.FC<CustomerOrdersProps> = props => {
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
|
@ -143,7 +143,7 @@ const CustomerOrders: React.FC<CustomerOrdersProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,7 +2,6 @@ import Button from "@material-ui/core/Button";
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import IconButton from "@material-ui/core/IconButton";
|
import IconButton from "@material-ui/core/IconButton";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -13,6 +12,7 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
import CardTitle from "@saleor/components/CardTitle";
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
import Checkbox from "@saleor/components/Checkbox";
|
import Checkbox from "@saleor/components/Checkbox";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import TableHead from "@saleor/components/TableHead";
|
import TableHead from "@saleor/components/TableHead";
|
||||||
import TablePagination from "@saleor/components/TablePagination";
|
import TablePagination from "@saleor/components/TablePagination";
|
||||||
|
@ -84,7 +84,7 @@ const DiscountCategories: React.FC<DiscountCategoriesProps> = props => {
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead
|
<TableHead
|
||||||
colSpan={numberOfColumns}
|
colSpan={numberOfColumns}
|
||||||
selected={selected}
|
selected={selected}
|
||||||
|
@ -173,7 +173,7 @@ const DiscountCategories: React.FC<DiscountCategoriesProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,7 +2,6 @@ import Button from "@material-ui/core/Button";
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import IconButton from "@material-ui/core/IconButton";
|
import IconButton from "@material-ui/core/IconButton";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -13,6 +12,7 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
import CardTitle from "@saleor/components/CardTitle";
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
import Checkbox from "@saleor/components/Checkbox";
|
import Checkbox from "@saleor/components/Checkbox";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import TableHead from "@saleor/components/TableHead";
|
import TableHead from "@saleor/components/TableHead";
|
||||||
import TablePagination from "@saleor/components/TablePagination";
|
import TablePagination from "@saleor/components/TablePagination";
|
||||||
|
@ -84,7 +84,7 @@ const DiscountCollections: React.FC<DiscountCollectionsProps> = props => {
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead
|
<TableHead
|
||||||
colSpan={numberOfColumns}
|
colSpan={numberOfColumns}
|
||||||
selected={selected}
|
selected={selected}
|
||||||
|
@ -173,7 +173,7 @@ const DiscountCollections: React.FC<DiscountCollectionsProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,7 +4,6 @@ import DialogActions from "@material-ui/core/DialogActions";
|
||||||
import DialogContent from "@material-ui/core/DialogContent";
|
import DialogContent from "@material-ui/core/DialogContent";
|
||||||
import DialogTitle from "@material-ui/core/DialogTitle";
|
import DialogTitle from "@material-ui/core/DialogTitle";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableRow from "@material-ui/core/TableRow";
|
import TableRow from "@material-ui/core/TableRow";
|
||||||
|
@ -21,6 +20,7 @@ import ConfirmButton, {
|
||||||
import Form from "@saleor/components/Form";
|
import Form from "@saleor/components/Form";
|
||||||
import FormSpacer from "@saleor/components/FormSpacer";
|
import FormSpacer from "@saleor/components/FormSpacer";
|
||||||
import Hr from "@saleor/components/Hr";
|
import Hr from "@saleor/components/Hr";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
// tslint:disable no-submodule-imports
|
// tslint:disable no-submodule-imports
|
||||||
import { ShopInfo_shop_countries } from "@saleor/components/Shop/types/ShopInfo";
|
import { ShopInfo_shop_countries } from "@saleor/components/Shop/types/ShopInfo";
|
||||||
import { buttonMessages } from "@saleor/intl";
|
import { buttonMessages } from "@saleor/intl";
|
||||||
|
@ -122,7 +122,7 @@ const DiscountCountrySelectDialog: React.FC<
|
||||||
description="country selection"
|
description="country selection"
|
||||||
/>
|
/>
|
||||||
</Typography>
|
</Typography>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{filter(countries, data.query, {
|
{filter(countries, data.query, {
|
||||||
key: "country"
|
key: "country"
|
||||||
|
@ -164,7 +164,7 @@ const DiscountCountrySelectDialog: React.FC<
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
<Button onClick={onClose}>
|
<Button onClick={onClose}>
|
||||||
|
|
|
@ -2,7 +2,6 @@ import Button from "@material-ui/core/Button";
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import IconButton from "@material-ui/core/IconButton";
|
import IconButton from "@material-ui/core/IconButton";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -13,6 +12,7 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
import CardTitle from "@saleor/components/CardTitle";
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
import Checkbox from "@saleor/components/Checkbox";
|
import Checkbox from "@saleor/components/Checkbox";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import StatusLabel from "@saleor/components/StatusLabel";
|
import StatusLabel from "@saleor/components/StatusLabel";
|
||||||
import TableCellAvatar, {
|
import TableCellAvatar, {
|
||||||
|
@ -98,7 +98,7 @@ const DiscountProducts: React.FC<SaleProductsProps> = props => {
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead
|
<TableHead
|
||||||
colSpan={numberOfColumns}
|
colSpan={numberOfColumns}
|
||||||
selected={selected}
|
selected={selected}
|
||||||
|
@ -212,7 +212,7 @@ const DiscountProducts: React.FC<SaleProductsProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -11,6 +10,7 @@ import Checkbox from "@saleor/components/Checkbox";
|
||||||
import Date from "@saleor/components/Date";
|
import Date from "@saleor/components/Date";
|
||||||
import Money from "@saleor/components/Money";
|
import Money from "@saleor/components/Money";
|
||||||
import Percent from "@saleor/components/Percent";
|
import Percent from "@saleor/components/Percent";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import TableHead from "@saleor/components/TableHead";
|
import TableHead from "@saleor/components/TableHead";
|
||||||
import TablePagination from "@saleor/components/TablePagination";
|
import TablePagination from "@saleor/components/TablePagination";
|
||||||
|
@ -77,7 +77,7 @@ const SaleList: React.FC<SaleListProps> = props => {
|
||||||
const classes = useStyles(props);
|
const classes = useStyles(props);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead
|
<TableHead
|
||||||
colSpan={numberOfColumns}
|
colSpan={numberOfColumns}
|
||||||
selected={selected}
|
selected={selected}
|
||||||
|
@ -189,7 +189,7 @@ const SaleList: React.FC<SaleListProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
SaleList.displayName = "SaleList";
|
SaleList.displayName = "SaleList";
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -11,6 +10,7 @@ import Checkbox from "@saleor/components/Checkbox";
|
||||||
import Date from "@saleor/components/Date";
|
import Date from "@saleor/components/Date";
|
||||||
import Money from "@saleor/components/Money";
|
import Money from "@saleor/components/Money";
|
||||||
import Percent from "@saleor/components/Percent";
|
import Percent from "@saleor/components/Percent";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import TableHead from "@saleor/components/TableHead";
|
import TableHead from "@saleor/components/TableHead";
|
||||||
import TablePagination from "@saleor/components/TablePagination";
|
import TablePagination from "@saleor/components/TablePagination";
|
||||||
|
@ -92,7 +92,7 @@ const VoucherList: React.FC<VoucherListProps> = props => {
|
||||||
const classes = useStyles(props);
|
const classes = useStyles(props);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead
|
<TableHead
|
||||||
colSpan={numberOfColumns}
|
colSpan={numberOfColumns}
|
||||||
selected={selected}
|
selected={selected}
|
||||||
|
@ -240,7 +240,7 @@ const VoucherList: React.FC<VoucherListProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
VoucherList.displayName = "VoucherList";
|
VoucherList.displayName = "VoucherList";
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableRow from "@material-ui/core/TableRow";
|
import TableRow from "@material-ui/core/TableRow";
|
||||||
|
@ -10,6 +9,7 @@ import React from "react";
|
||||||
import { FormattedMessage } from "react-intl";
|
import { FormattedMessage } from "react-intl";
|
||||||
|
|
||||||
import RequirePermissions from "@saleor/components/RequirePermissions";
|
import RequirePermissions from "@saleor/components/RequirePermissions";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import { UserPermissionProps } from "@saleor/types";
|
import { UserPermissionProps } from "@saleor/types";
|
||||||
import { PermissionEnum } from "@saleor/types/globalTypes";
|
import { PermissionEnum } from "@saleor/types/globalTypes";
|
||||||
|
@ -47,7 +47,7 @@ const HomeNotificationTable: React.FC<HomeNotificationTableProps> = props => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableBody className={classes.tableRow}>
|
<TableBody className={classes.tableRow}>
|
||||||
<RequirePermissions
|
<RequirePermissions
|
||||||
userPermissions={userPermissions}
|
userPermissions={userPermissions}
|
||||||
|
@ -150,7 +150,7 @@ const HomeNotificationTable: React.FC<HomeNotificationTableProps> = props => {
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</RequirePermissions>
|
</RequirePermissions>
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableRow from "@material-ui/core/TableRow";
|
import TableRow from "@material-ui/core/TableRow";
|
||||||
|
@ -11,6 +10,7 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
import CardTitle from "@saleor/components/CardTitle";
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
import Money from "@saleor/components/Money";
|
import Money from "@saleor/components/Money";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import TableCellAvatar from "@saleor/components/TableCellAvatar";
|
import TableCellAvatar from "@saleor/components/TableCellAvatar";
|
||||||
import { maybe, renderCollection } from "../../../misc";
|
import { maybe, renderCollection } from "../../../misc";
|
||||||
|
@ -58,7 +58,7 @@ export const HomeProductList: React.FC<HomeProductListProps> = props => {
|
||||||
id: "homeProductsListCardHeader"
|
id: "homeProductsListCardHeader"
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{renderCollection(
|
{renderCollection(
|
||||||
topProducts,
|
topProducts,
|
||||||
|
@ -139,7 +139,7 @@ export const HomeProductList: React.FC<HomeProductListProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -11,6 +10,7 @@ import { FormattedMessage } from "react-intl";
|
||||||
|
|
||||||
import Checkbox from "@saleor/components/Checkbox";
|
import Checkbox from "@saleor/components/Checkbox";
|
||||||
import IconButtonTableCell from "@saleor/components/IconButtonTableCell";
|
import IconButtonTableCell from "@saleor/components/IconButtonTableCell";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import TableHead from "@saleor/components/TableHead";
|
import TableHead from "@saleor/components/TableHead";
|
||||||
import TablePagination from "@saleor/components/TablePagination";
|
import TablePagination from "@saleor/components/TablePagination";
|
||||||
|
@ -65,7 +65,7 @@ const MenuList: React.FC<MenuListProps> = props => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead
|
<TableHead
|
||||||
colSpan={numberOfColumns}
|
colSpan={numberOfColumns}
|
||||||
selected={selected}
|
selected={selected}
|
||||||
|
@ -156,7 +156,7 @@ const MenuList: React.FC<MenuListProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,15 +23,21 @@ import OrderHistory, { FormData as HistoryFormData } from "../OrderHistory";
|
||||||
import OrderPayment from "../OrderPayment/OrderPayment";
|
import OrderPayment from "../OrderPayment/OrderPayment";
|
||||||
import OrderUnfulfilledItems from "../OrderUnfulfilledItems/OrderUnfulfilledItems";
|
import OrderUnfulfilledItems from "../OrderUnfulfilledItems/OrderUnfulfilledItems";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
date: {
|
theme => ({
|
||||||
marginBottom: theme.spacing(3),
|
date: {
|
||||||
marginTop: -theme.spacing(2)
|
marginBottom: theme.spacing(3),
|
||||||
},
|
marginTop: -theme.spacing(2)
|
||||||
header: {
|
},
|
||||||
marginBottom: 0
|
header: {
|
||||||
|
display: "flex",
|
||||||
|
marginBottom: 0
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
name: "OrderDetailsPage"
|
||||||
}
|
}
|
||||||
}));
|
);
|
||||||
|
|
||||||
export interface OrderDetailsPageProps extends UserPermissionProps {
|
export interface OrderDetailsPageProps extends UserPermissionProps {
|
||||||
order: OrderDetails_order;
|
order: OrderDetails_order;
|
||||||
|
@ -95,6 +101,7 @@ const OrderDetailsPage: React.FC<OrderDetailsPageProps> = props => {
|
||||||
</AppHeader>
|
</AppHeader>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
className={classes.header}
|
className={classes.header}
|
||||||
|
inline
|
||||||
title={maybe(() => order.number) ? "#" + order.number : undefined}
|
title={maybe(() => order.number) ? "#" + order.number : undefined}
|
||||||
>
|
>
|
||||||
{canCancel && (
|
{canCancel && (
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import IconButton from "@material-ui/core/IconButton";
|
import IconButton from "@material-ui/core/IconButton";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableHead from "@material-ui/core/TableHead";
|
import TableHead from "@material-ui/core/TableHead";
|
||||||
|
@ -14,6 +13,7 @@ import { FormattedMessage } from "react-intl";
|
||||||
import { DebounceForm } from "@saleor/components/DebounceForm";
|
import { DebounceForm } from "@saleor/components/DebounceForm";
|
||||||
import Form from "@saleor/components/Form";
|
import Form from "@saleor/components/Form";
|
||||||
import Money from "@saleor/components/Money";
|
import Money from "@saleor/components/Money";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import TableCellAvatar, {
|
import TableCellAvatar, {
|
||||||
AVATAR_MARGIN
|
AVATAR_MARGIN
|
||||||
|
@ -76,7 +76,7 @@ const OrderDraftDetailsProducts: React.FC<
|
||||||
const classes = useStyles(props);
|
const classes = useStyles(props);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table className={classes.table}>
|
<ResponsiveTable className={classes.table}>
|
||||||
{maybe(() => !!lines.length) && (
|
{maybe(() => !!lines.length) && (
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
|
@ -187,7 +187,7 @@ const OrderDraftDetailsProducts: React.FC<
|
||||||
))
|
))
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
OrderDraftDetailsProducts.displayName = "OrderDraftDetailsProducts";
|
OrderDraftDetailsProducts.displayName = "OrderDraftDetailsProducts";
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -10,6 +9,7 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||||
import Checkbox from "@saleor/components/Checkbox";
|
import Checkbox from "@saleor/components/Checkbox";
|
||||||
import { DateTime } from "@saleor/components/Date";
|
import { DateTime } from "@saleor/components/Date";
|
||||||
import Money from "@saleor/components/Money";
|
import Money from "@saleor/components/Money";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import TableHead from "@saleor/components/TableHead";
|
import TableHead from "@saleor/components/TableHead";
|
||||||
import TablePagination from "@saleor/components/TablePagination";
|
import TablePagination from "@saleor/components/TablePagination";
|
||||||
|
@ -83,7 +83,7 @@ export const OrderDraftList: React.FC<OrderDraftListProps> = props => {
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead
|
<TableHead
|
||||||
colSpan={numberOfColumns}
|
colSpan={numberOfColumns}
|
||||||
selected={selected}
|
selected={selected}
|
||||||
|
@ -194,7 +194,7 @@ export const OrderDraftList: React.FC<OrderDraftListProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
OrderDraftList.displayName = "OrderDraftList";
|
OrderDraftList.displayName = "OrderDraftList";
|
||||||
|
|
|
@ -25,10 +25,10 @@ import OrderHistory, { FormData as HistoryFormData } from "../OrderHistory";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(theme => ({
|
||||||
date: {
|
date: {
|
||||||
marginBottom: theme.spacing(3),
|
marginBottom: theme.spacing(3)
|
||||||
marginLeft: theme.spacing(7)
|
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
|
display: "flex",
|
||||||
marginBottom: 0
|
marginBottom: 0
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
@ -99,6 +99,7 @@ const OrderDraftPage: React.FC<OrderDraftPageProps> = props => {
|
||||||
</AppHeader>
|
</AppHeader>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
className={classes.header}
|
className={classes.header}
|
||||||
|
inline
|
||||||
title={maybe(() => order.number) ? "#" + order.number : undefined}
|
title={maybe(() => order.number) ? "#" + order.number : undefined}
|
||||||
>
|
>
|
||||||
<CardMenu
|
<CardMenu
|
||||||
|
|
|
@ -2,7 +2,6 @@ import Button from "@material-ui/core/Button";
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import CardActions from "@material-ui/core/CardActions";
|
import CardActions from "@material-ui/core/CardActions";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableHead from "@material-ui/core/TableHead";
|
import TableHead from "@material-ui/core/TableHead";
|
||||||
|
@ -14,6 +13,7 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||||
import CardMenu from "@saleor/components/CardMenu";
|
import CardMenu from "@saleor/components/CardMenu";
|
||||||
import CardTitle from "@saleor/components/CardTitle";
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
import Money from "@saleor/components/Money";
|
import Money from "@saleor/components/Money";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import StatusLabel from "@saleor/components/StatusLabel";
|
import StatusLabel from "@saleor/components/StatusLabel";
|
||||||
import TableCellAvatar, {
|
import TableCellAvatar, {
|
||||||
|
@ -142,7 +142,7 @@ const OrderFulfillment: React.FC<OrderFulfillmentProps> = props => {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Table className={classes.table}>
|
<ResponsiveTable className={classes.table}>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell className={classes.colName}>
|
<TableCell className={classes.colName}>
|
||||||
|
@ -226,7 +226,7 @@ const OrderFulfillment: React.FC<OrderFulfillmentProps> = props => {
|
||||||
</TableRow>
|
</TableRow>
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
{status === FulfillmentStatus.FULFILLED && !fulfillment.trackingNumber && (
|
{status === FulfillmentStatus.FULFILLED && !fulfillment.trackingNumber && (
|
||||||
<CardActions>
|
<CardActions>
|
||||||
<Button color="primary" onClick={onTrackingCodeAdd}>
|
<Button color="primary" onClick={onTrackingCodeAdd}>
|
||||||
|
|
|
@ -4,7 +4,6 @@ import DialogActions from "@material-ui/core/DialogActions";
|
||||||
import DialogContent from "@material-ui/core/DialogContent";
|
import DialogContent from "@material-ui/core/DialogContent";
|
||||||
import DialogTitle from "@material-ui/core/DialogTitle";
|
import DialogTitle from "@material-ui/core/DialogTitle";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableHead from "@material-ui/core/TableHead";
|
import TableHead from "@material-ui/core/TableHead";
|
||||||
|
@ -18,6 +17,7 @@ import ConfirmButton, {
|
||||||
} from "@saleor/components/ConfirmButton";
|
} from "@saleor/components/ConfirmButton";
|
||||||
import Form from "@saleor/components/Form";
|
import Form from "@saleor/components/Form";
|
||||||
import { FormSpacer } from "@saleor/components/FormSpacer";
|
import { FormSpacer } from "@saleor/components/FormSpacer";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import TableCellAvatar, {
|
import TableCellAvatar, {
|
||||||
AVATAR_MARGIN
|
AVATAR_MARGIN
|
||||||
} from "@saleor/components/TableCellAvatar";
|
} from "@saleor/components/TableCellAvatar";
|
||||||
|
@ -111,7 +111,7 @@ const OrderFulfillmentDialog: React.FC<OrderFulfillmentDialogProps> = props => {
|
||||||
description="dialog header"
|
description="dialog header"
|
||||||
/>
|
/>
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<Table className={classes.table}>
|
<ResponsiveTable className={classes.table}>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell className={classes.colName}>
|
<TableCell className={classes.colName}>
|
||||||
|
@ -174,7 +174,7 @@ const OrderFulfillmentDialog: React.FC<OrderFulfillmentDialogProps> = props => {
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<FormSpacer />
|
<FormSpacer />
|
||||||
<TextField
|
<TextField
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -10,6 +9,7 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||||
import Checkbox from "@saleor/components/Checkbox";
|
import Checkbox from "@saleor/components/Checkbox";
|
||||||
import { DateTime } from "@saleor/components/Date";
|
import { DateTime } from "@saleor/components/Date";
|
||||||
import Money from "@saleor/components/Money";
|
import Money from "@saleor/components/Money";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import StatusLabel from "@saleor/components/StatusLabel";
|
import StatusLabel from "@saleor/components/StatusLabel";
|
||||||
import TableHead from "@saleor/components/TableHead";
|
import TableHead from "@saleor/components/TableHead";
|
||||||
|
@ -87,7 +87,7 @@ export const OrderList: React.FC<OrderListProps> = props => {
|
||||||
}))
|
}))
|
||||||
: undefined;
|
: undefined;
|
||||||
return (
|
return (
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead
|
<TableHead
|
||||||
colSpan={numberOfColumns}
|
colSpan={numberOfColumns}
|
||||||
selected={selected}
|
selected={selected}
|
||||||
|
@ -232,7 +232,7 @@ export const OrderList: React.FC<OrderListProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
OrderList.displayName = "OrderList";
|
OrderList.displayName = "OrderList";
|
||||||
|
|
|
@ -5,7 +5,6 @@ import DialogActions from "@material-ui/core/DialogActions";
|
||||||
import DialogContent from "@material-ui/core/DialogContent";
|
import DialogContent from "@material-ui/core/DialogContent";
|
||||||
import DialogTitle from "@material-ui/core/DialogTitle";
|
import DialogTitle from "@material-ui/core/DialogTitle";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableRow from "@material-ui/core/TableRow";
|
import TableRow from "@material-ui/core/TableRow";
|
||||||
|
@ -19,6 +18,7 @@ import ConfirmButton, {
|
||||||
ConfirmButtonTransitionState
|
ConfirmButtonTransitionState
|
||||||
} from "@saleor/components/ConfirmButton";
|
} from "@saleor/components/ConfirmButton";
|
||||||
import Money from "@saleor/components/Money";
|
import Money from "@saleor/components/Money";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import TableCellAvatar from "@saleor/components/TableCellAvatar";
|
import TableCellAvatar from "@saleor/components/TableCellAvatar";
|
||||||
import useSearchQuery from "@saleor/hooks/useSearchQuery";
|
import useSearchQuery from "@saleor/hooks/useSearchQuery";
|
||||||
import { buttonMessages } from "@saleor/intl";
|
import { buttonMessages } from "@saleor/intl";
|
||||||
|
@ -227,7 +227,7 @@ const OrderProductAddDialog: React.FC<OrderProductAddDialogProps> = props => {
|
||||||
}
|
}
|
||||||
threshold={10}
|
threshold={10}
|
||||||
>
|
>
|
||||||
<Table key="table">
|
<ResponsiveTable key="table">
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{renderCollection(
|
{renderCollection(
|
||||||
products,
|
products,
|
||||||
|
@ -316,7 +316,7 @@ const OrderProductAddDialog: React.FC<OrderProductAddDialogProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</InfiniteScroll>
|
</InfiniteScroll>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
|
|
|
@ -2,7 +2,6 @@ import Button from "@material-ui/core/Button";
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import CardActions from "@material-ui/core/CardActions";
|
import CardActions from "@material-ui/core/CardActions";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableHead from "@material-ui/core/TableHead";
|
import TableHead from "@material-ui/core/TableHead";
|
||||||
|
@ -12,6 +11,7 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
import CardTitle from "@saleor/components/CardTitle";
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
import Money from "@saleor/components/Money";
|
import Money from "@saleor/components/Money";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import StatusLabel from "@saleor/components/StatusLabel";
|
import StatusLabel from "@saleor/components/StatusLabel";
|
||||||
import TableCellAvatar, {
|
import TableCellAvatar, {
|
||||||
|
@ -83,7 +83,7 @@ const OrderUnfulfilledItems: React.FC<OrderUnfulfilledItemsProps> = props => {
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Table className={classes.table}>
|
<ResponsiveTable className={classes.table}>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell className={classes.colName}>
|
<TableCell className={classes.colName}>
|
||||||
|
@ -160,7 +160,7 @@ const OrderUnfulfilledItems: React.FC<OrderUnfulfilledItemsProps> = props => {
|
||||||
</TableRow>
|
</TableRow>
|
||||||
))}
|
))}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
{canFulfill && (
|
{canFulfill && (
|
||||||
<CardActions>
|
<CardActions>
|
||||||
<Button variant="text" color="primary" onClick={onFulfill}>
|
<Button variant="text" color="primary" onClick={onFulfill}>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -9,6 +8,7 @@ import React from "react";
|
||||||
import { FormattedMessage, useIntl } from "react-intl";
|
import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
import Checkbox from "@saleor/components/Checkbox";
|
import Checkbox from "@saleor/components/Checkbox";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import StatusLabel from "@saleor/components/StatusLabel";
|
import StatusLabel from "@saleor/components/StatusLabel";
|
||||||
import TableHead from "@saleor/components/TableHead";
|
import TableHead from "@saleor/components/TableHead";
|
||||||
|
@ -65,7 +65,7 @@ const PageList: React.FC<PageListProps> = props => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead
|
<TableHead
|
||||||
colSpan={numberOfColumns}
|
colSpan={numberOfColumns}
|
||||||
selected={selected}
|
selected={selected}
|
||||||
|
@ -169,7 +169,7 @@ const PageList: React.FC<PageListProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -10,6 +9,7 @@ import EditIcon from "@material-ui/icons/Edit";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useIntl } from "react-intl";
|
import { useIntl } from "react-intl";
|
||||||
|
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import StatusLabel from "@saleor/components/StatusLabel";
|
import StatusLabel from "@saleor/components/StatusLabel";
|
||||||
import TablePagination from "@saleor/components/TablePagination";
|
import TablePagination from "@saleor/components/TablePagination";
|
||||||
|
@ -59,7 +59,7 @@ const PluginList: React.FC<PluginListProps> = props => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableCell className={classes.colName}>
|
<TableCell className={classes.colName}>
|
||||||
{intl.formatMessage({
|
{intl.formatMessage({
|
||||||
|
@ -139,7 +139,7 @@ const PluginList: React.FC<PluginListProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,7 +6,6 @@ import DialogContent from "@material-ui/core/DialogContent";
|
||||||
import DialogContentText from "@material-ui/core/DialogContentText";
|
import DialogContentText from "@material-ui/core/DialogContentText";
|
||||||
import DialogTitle from "@material-ui/core/DialogTitle";
|
import DialogTitle from "@material-ui/core/DialogTitle";
|
||||||
import makeStyles from "@material-ui/core/styles/makeStyles";
|
import makeStyles from "@material-ui/core/styles/makeStyles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableRow from "@material-ui/core/TableRow";
|
import TableRow from "@material-ui/core/TableRow";
|
||||||
|
@ -21,6 +20,7 @@ import Checkbox from "@saleor/components/Checkbox";
|
||||||
import ConfirmButton, {
|
import ConfirmButton, {
|
||||||
ConfirmButtonTransitionState
|
ConfirmButtonTransitionState
|
||||||
} from "@saleor/components/ConfirmButton";
|
} from "@saleor/components/ConfirmButton";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import useElementScroll, {
|
import useElementScroll, {
|
||||||
isScrolledToBottom
|
isScrolledToBottom
|
||||||
} from "@saleor/hooks/useElementScroll";
|
} from "@saleor/hooks/useElementScroll";
|
||||||
|
@ -136,7 +136,7 @@ const AssignAttributeDialog: React.FC<AssignAttributeDialogProps> = ({
|
||||||
threshold={100}
|
threshold={100}
|
||||||
key="infinite-scroll"
|
key="infinite-scroll"
|
||||||
>
|
>
|
||||||
<Table key="table">
|
<ResponsiveTable key="table">
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{renderCollection(
|
{renderCollection(
|
||||||
attributes,
|
attributes,
|
||||||
|
@ -178,7 +178,7 @@ const AssignAttributeDialog: React.FC<AssignAttributeDialogProps> = ({
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</InfiniteScroll>
|
</InfiniteScroll>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
{errors.length > 0 && (
|
{errors.length > 0 && (
|
||||||
|
|
|
@ -2,7 +2,6 @@ import Button from "@material-ui/core/Button";
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import IconButton from "@material-ui/core/IconButton";
|
import IconButton from "@material-ui/core/IconButton";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableRow from "@material-ui/core/TableRow";
|
import TableRow from "@material-ui/core/TableRow";
|
||||||
import DeleteIcon from "@material-ui/icons/Delete";
|
import DeleteIcon from "@material-ui/icons/Delete";
|
||||||
|
@ -11,6 +10,7 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
import CardTitle from "@saleor/components/CardTitle";
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
import Checkbox from "@saleor/components/Checkbox";
|
import Checkbox from "@saleor/components/Checkbox";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import {
|
import {
|
||||||
SortableTableBody,
|
SortableTableBody,
|
||||||
|
@ -111,7 +111,7 @@ const ProductTypeAttributes: React.FC<ProductTypeAttributesProps> = props => {
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead
|
<TableHead
|
||||||
colSpan={numberOfColumns}
|
colSpan={numberOfColumns}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
|
@ -196,7 +196,7 @@ const ProductTypeAttributes: React.FC<ProductTypeAttributesProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</SortableTableBody>
|
</SortableTableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -9,6 +8,7 @@ import React from "react";
|
||||||
import { FormattedMessage, useIntl } from "react-intl";
|
import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
import Checkbox from "@saleor/components/Checkbox";
|
import Checkbox from "@saleor/components/Checkbox";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import TableHead from "@saleor/components/TableHead";
|
import TableHead from "@saleor/components/TableHead";
|
||||||
import TablePagination from "@saleor/components/TablePagination";
|
import TablePagination from "@saleor/components/TablePagination";
|
||||||
|
@ -61,7 +61,7 @@ const ProductTypeList: React.FC<ProductTypeListProps> = props => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead
|
<TableHead
|
||||||
colSpan={numberOfColumns}
|
colSpan={numberOfColumns}
|
||||||
selected={selected}
|
selected={selected}
|
||||||
|
@ -185,7 +185,7 @@ const ProductTypeList: React.FC<ProductTypeListProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
ProductTypeList.displayName = "ProductTypeList";
|
ProductTypeList.displayName = "ProductTypeList";
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -10,6 +9,7 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
import Checkbox from "@saleor/components/Checkbox";
|
import Checkbox from "@saleor/components/Checkbox";
|
||||||
import Money from "@saleor/components/Money";
|
import Money from "@saleor/components/Money";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import StatusLabel from "@saleor/components/StatusLabel";
|
import StatusLabel from "@saleor/components/StatusLabel";
|
||||||
import TableCellAvatar, {
|
import TableCellAvatar, {
|
||||||
|
@ -131,7 +131,7 @@ export const ProductList: React.FC<ProductListProps> = props => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classes.tableContainer}>
|
<div className={classes.tableContainer}>
|
||||||
<Table className={classes.table}>
|
<ResponsiveTable className={classes.table}>
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col />
|
<col />
|
||||||
<col className={classes.colName} />
|
<col className={classes.colName} />
|
||||||
|
@ -392,7 +392,7 @@ export const ProductList: React.FC<ProductListProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import Button from "@material-ui/core/Button";
|
import Button from "@material-ui/core/Button";
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableRow from "@material-ui/core/TableRow";
|
import TableRow from "@material-ui/core/TableRow";
|
||||||
|
@ -10,6 +9,7 @@ import React from "react";
|
||||||
import { FormattedMessage, useIntl } from "react-intl";
|
import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
import CardTitle from "@saleor/components/CardTitle";
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import TableCellAvatar from "@saleor/components/TableCellAvatar";
|
import TableCellAvatar from "@saleor/components/TableCellAvatar";
|
||||||
import { maybe, renderCollection } from "../../../misc";
|
import { maybe, renderCollection } from "../../../misc";
|
||||||
|
@ -64,7 +64,7 @@ const ProductVariantNavigation: React.FC<
|
||||||
description: "section header"
|
description: "section header"
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{renderCollection(variants, variant => (
|
{renderCollection(variants, variant => (
|
||||||
<TableRow
|
<TableRow
|
||||||
|
@ -110,7 +110,7 @@ const ProductVariantNavigation: React.FC<
|
||||||
</TableRow>
|
</TableRow>
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,6 @@ import Card from "@material-ui/core/Card";
|
||||||
import CardContent from "@material-ui/core/CardContent";
|
import CardContent from "@material-ui/core/CardContent";
|
||||||
import Hidden from "@material-ui/core/Hidden";
|
import Hidden from "@material-ui/core/Hidden";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableRow from "@material-ui/core/TableRow";
|
import TableRow from "@material-ui/core/TableRow";
|
||||||
|
@ -14,6 +13,7 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||||
import CardTitle from "@saleor/components/CardTitle";
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
import Checkbox from "@saleor/components/Checkbox";
|
import Checkbox from "@saleor/components/Checkbox";
|
||||||
import Money from "@saleor/components/Money";
|
import Money from "@saleor/components/Money";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import StatusLabel from "@saleor/components/StatusLabel";
|
import StatusLabel from "@saleor/components/StatusLabel";
|
||||||
import TableHead from "@saleor/components/TableHead";
|
import TableHead from "@saleor/components/TableHead";
|
||||||
|
@ -133,7 +133,7 @@ export const ProductVariants: React.FC<ProductVariantsProps> = props => {
|
||||||
</CardContent>
|
</CardContent>
|
||||||
)}
|
)}
|
||||||
{hasVariants && (
|
{hasVariants && (
|
||||||
<Table className={classes.denseTable}>
|
<ResponsiveTable className={classes.denseTable}>
|
||||||
<TableHead
|
<TableHead
|
||||||
colSpan={numberOfColumns}
|
colSpan={numberOfColumns}
|
||||||
selected={selected}
|
selected={selected}
|
||||||
|
@ -237,7 +237,7 @@ export const ProductVariants: React.FC<ProductVariantsProps> = props => {
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
)}
|
)}
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import IconButton from "@material-ui/core/IconButton";
|
import IconButton from "@material-ui/core/IconButton";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -12,6 +11,7 @@ import EditIcon from "@material-ui/icons/Edit";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { FormattedMessage } from "react-intl";
|
import { FormattedMessage } from "react-intl";
|
||||||
|
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import TablePagination from "@saleor/components/TablePagination";
|
import TablePagination from "@saleor/components/TablePagination";
|
||||||
import { maybe, renderCollection, stopPropagation } from "@saleor/misc";
|
import { maybe, renderCollection, stopPropagation } from "@saleor/misc";
|
||||||
|
@ -68,7 +68,7 @@ const ServiceList: React.FC<ServiceListProps> = props => {
|
||||||
const classes = useStyles(props);
|
const classes = useStyles(props);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table className={classes.table}>
|
<ResponsiveTable className={classes.table}>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell className={classes.colName}>
|
<TableCell className={classes.colName}>
|
||||||
|
@ -154,7 +154,7 @@ const ServiceList: React.FC<ServiceListProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
ServiceList.displayName = "ServiceList";
|
ServiceList.displayName = "ServiceList";
|
||||||
|
|
|
@ -2,7 +2,6 @@ import Button from "@material-ui/core/Button";
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import IconButton from "@material-ui/core/IconButton";
|
import IconButton from "@material-ui/core/IconButton";
|
||||||
import makeStyles from "@material-ui/core/styles/makeStyles";
|
import makeStyles from "@material-ui/core/styles/makeStyles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableHead from "@material-ui/core/TableHead";
|
import TableHead from "@material-ui/core/TableHead";
|
||||||
|
@ -12,6 +11,7 @@ import React from "react";
|
||||||
import { FormattedMessage, useIntl } from "react-intl";
|
import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
import CardTitle from "@saleor/components/CardTitle";
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import { maybe, renderCollection } from "@saleor/misc";
|
import { maybe, renderCollection } from "@saleor/misc";
|
||||||
import { ServiceDetailsFragment_tokens } from "@saleor/services/types/ServiceDetailsFragment";
|
import { ServiceDetailsFragment_tokens } from "@saleor/services/types/ServiceDetailsFragment";
|
||||||
|
@ -64,7 +64,7 @@ const ServiceTokens: React.FC<ServiceTokensProps> = props => {
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell className={classes.colNote}>
|
<TableCell className={classes.colNote}>
|
||||||
|
@ -117,7 +117,7 @@ const ServiceTokens: React.FC<ServiceTokensProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,7 +4,6 @@ import DialogActions from "@material-ui/core/DialogActions";
|
||||||
import DialogContent from "@material-ui/core/DialogContent";
|
import DialogContent from "@material-ui/core/DialogContent";
|
||||||
import DialogTitle from "@material-ui/core/DialogTitle";
|
import DialogTitle from "@material-ui/core/DialogTitle";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableRow from "@material-ui/core/TableRow";
|
import TableRow from "@material-ui/core/TableRow";
|
||||||
|
@ -21,6 +20,7 @@ import ConfirmButton, {
|
||||||
import Form from "@saleor/components/Form";
|
import Form from "@saleor/components/Form";
|
||||||
import FormSpacer from "@saleor/components/FormSpacer";
|
import FormSpacer from "@saleor/components/FormSpacer";
|
||||||
import Hr from "@saleor/components/Hr";
|
import Hr from "@saleor/components/Hr";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import { ShopInfo_shop_countries } from "@saleor/components/Shop/types/ShopInfo";
|
import { ShopInfo_shop_countries } from "@saleor/components/Shop/types/ShopInfo";
|
||||||
import { buttonMessages } from "@saleor/intl";
|
import { buttonMessages } from "@saleor/intl";
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ const ShippingZoneCountriesAssignDialog: React.FC<
|
||||||
<Typography className={classes.heading} variant="subtitle1">
|
<Typography className={classes.heading} variant="subtitle1">
|
||||||
<FormattedMessage defaultMessage="Quick Pick" />
|
<FormattedMessage defaultMessage="Quick Pick" />
|
||||||
</Typography>
|
</Typography>
|
||||||
<Table className={classes.table}>
|
<ResponsiveTable className={classes.table}>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell className={classes.wideCell}>
|
<TableCell className={classes.wideCell}>
|
||||||
|
@ -149,7 +149,7 @@ const ShippingZoneCountriesAssignDialog: React.FC<
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|
||||||
<DialogContent className={classes.container}>
|
<DialogContent className={classes.container}>
|
||||||
|
@ -159,7 +159,7 @@ const ShippingZoneCountriesAssignDialog: React.FC<
|
||||||
description="country selection"
|
description="country selection"
|
||||||
/>
|
/>
|
||||||
</Typography>
|
</Typography>
|
||||||
<Table className={classes.table}>
|
<ResponsiveTable className={classes.table}>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{filter(countries, data.query, {
|
{filter(countries, data.query, {
|
||||||
key: "country"
|
key: "country"
|
||||||
|
@ -201,7 +201,7 @@ const ShippingZoneCountriesAssignDialog: React.FC<
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
<Button onClick={onClose}>
|
<Button onClick={onClose}>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import Button from "@material-ui/core/Button";
|
import Button from "@material-ui/core/Button";
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableHead from "@material-ui/core/TableHead";
|
import TableHead from "@material-ui/core/TableHead";
|
||||||
|
@ -15,6 +14,7 @@ import CardTitle from "@saleor/components/CardTitle";
|
||||||
import IconButtonTableCell from "@saleor/components/IconButtonTableCell";
|
import IconButtonTableCell from "@saleor/components/IconButtonTableCell";
|
||||||
import Money from "@saleor/components/Money";
|
import Money from "@saleor/components/Money";
|
||||||
import MoneyRange from "@saleor/components/MoneyRange";
|
import MoneyRange from "@saleor/components/MoneyRange";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import WeightRange from "@saleor/components/WeightRange";
|
import WeightRange from "@saleor/components/WeightRange";
|
||||||
import { maybe, renderCollection } from "../../../misc";
|
import { maybe, renderCollection } from "../../../misc";
|
||||||
|
@ -82,7 +82,7 @@ const ShippingZoneRates: React.FC<ShippingZoneRatesProps> = props => {
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell className={classes.nameColumn}>
|
<TableCell className={classes.nameColumn}>
|
||||||
|
@ -172,7 +172,7 @@ const ShippingZoneRates: React.FC<ShippingZoneRatesProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,7 +2,6 @@ import Button from "@material-ui/core/Button";
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import IconButton from "@material-ui/core/IconButton";
|
import IconButton from "@material-ui/core/IconButton";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -13,6 +12,7 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
import CardTitle from "@saleor/components/CardTitle";
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
import Checkbox from "@saleor/components/Checkbox";
|
import Checkbox from "@saleor/components/Checkbox";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import TableHead from "@saleor/components/TableHead";
|
import TableHead from "@saleor/components/TableHead";
|
||||||
import TablePagination from "@saleor/components/TablePagination";
|
import TablePagination from "@saleor/components/TablePagination";
|
||||||
|
@ -88,7 +88,7 @@ const ShippingZonesList: React.FC<ShippingZonesListProps> = props => {
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead
|
<TableHead
|
||||||
colSpan={numberOfColumns}
|
colSpan={numberOfColumns}
|
||||||
selected={selected}
|
selected={selected}
|
||||||
|
@ -183,7 +183,7 @@ const ShippingZonesList: React.FC<ShippingZonesListProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,7 +2,6 @@ import Button from "@material-ui/core/Button";
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import IconButton from "@material-ui/core/IconButton";
|
import IconButton from "@material-ui/core/IconButton";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableHead from "@material-ui/core/TableHead";
|
import TableHead from "@material-ui/core/TableHead";
|
||||||
|
@ -12,6 +11,7 @@ import React from "react";
|
||||||
import { FormattedMessage, useIntl } from "react-intl";
|
import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
import CardTitle from "@saleor/components/CardTitle";
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import { authorizationKeyTypes, maybe, renderCollection } from "../../../misc";
|
import { authorizationKeyTypes, maybe, renderCollection } from "../../../misc";
|
||||||
import { ICONBUTTON_SIZE } from "../../../theme";
|
import { ICONBUTTON_SIZE } from "../../../theme";
|
||||||
|
@ -58,7 +58,7 @@ const SiteSettingsKeys: React.FC<SiteSettingsKeysProps> = props => {
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
|
@ -109,7 +109,7 @@ const SiteSettingsKeys: React.FC<SiteSettingsKeysProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -10,6 +9,7 @@ import classNames from "classnames";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { FormattedMessage, useIntl } from "react-intl";
|
import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import TablePagination from "@saleor/components/TablePagination";
|
import TablePagination from "@saleor/components/TablePagination";
|
||||||
import {
|
import {
|
||||||
|
@ -78,7 +78,7 @@ const StaffList: React.FC<StaffListProps> = props => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell className={classes.wideColumn}>
|
<TableCell className={classes.wideColumn}>
|
||||||
|
@ -167,7 +167,7 @@ const StaffList: React.FC<StaffListProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
StaffList.displayName = "StaffList";
|
StaffList.displayName = "StaffList";
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,3 @@
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableHead from "@material-ui/core/TableHead";
|
import TableHead from "@material-ui/core/TableHead";
|
||||||
|
@ -7,6 +6,7 @@ import { storiesOf } from "@storybook/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import EditableTableCell from "@saleor/components/EditableTableCell";
|
import EditableTableCell from "@saleor/components/EditableTableCell";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import CardDecorator from "../../CardDecorator";
|
import CardDecorator from "../../CardDecorator";
|
||||||
import Decorator from "../../Decorator";
|
import Decorator from "../../Decorator";
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ storiesOf("Generics / EditableTableCell", module)
|
||||||
.addDecorator(CardDecorator)
|
.addDecorator(CardDecorator)
|
||||||
.addDecorator(Decorator)
|
.addDecorator(Decorator)
|
||||||
.add("default", () => (
|
.add("default", () => (
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableCell>Some header</TableCell>
|
<TableCell>Some header</TableCell>
|
||||||
<TableCell>Some header</TableCell>
|
<TableCell>Some header</TableCell>
|
||||||
|
@ -30,5 +30,5 @@ storiesOf("Generics / EditableTableCell", module)
|
||||||
<TableCell>Some value</TableCell>
|
<TableCell>Some value</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
));
|
));
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import { storiesOf } from "@storybook/react";
|
import { storiesOf } from "@storybook/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import TablePagination from "@saleor/components/TablePagination";
|
import TablePagination from "@saleor/components/TablePagination";
|
||||||
import CardDecorator from "../../CardDecorator";
|
import CardDecorator from "../../CardDecorator";
|
||||||
import Decorator from "../../Decorator";
|
import Decorator from "../../Decorator";
|
||||||
|
@ -10,7 +10,7 @@ storiesOf("Generics / TablePagination", module)
|
||||||
.addDecorator(CardDecorator)
|
.addDecorator(CardDecorator)
|
||||||
.addDecorator(Decorator)
|
.addDecorator(Decorator)
|
||||||
.add("no previous / next page", () => (
|
.add("no previous / next page", () => (
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TablePagination
|
<TablePagination
|
||||||
colSpan={1}
|
colSpan={1}
|
||||||
hasNextPage={false}
|
hasNextPage={false}
|
||||||
|
@ -18,10 +18,10 @@ storiesOf("Generics / TablePagination", module)
|
||||||
onPreviousPage={undefined}
|
onPreviousPage={undefined}
|
||||||
onNextPage={undefined}
|
onNextPage={undefined}
|
||||||
/>
|
/>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
))
|
))
|
||||||
.add("previous page available", () => (
|
.add("previous page available", () => (
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TablePagination
|
<TablePagination
|
||||||
colSpan={1}
|
colSpan={1}
|
||||||
hasNextPage={false}
|
hasNextPage={false}
|
||||||
|
@ -29,10 +29,10 @@ storiesOf("Generics / TablePagination", module)
|
||||||
onPreviousPage={undefined}
|
onPreviousPage={undefined}
|
||||||
onNextPage={undefined}
|
onNextPage={undefined}
|
||||||
/>
|
/>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
))
|
))
|
||||||
.add("next page available", () => (
|
.add("next page available", () => (
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TablePagination
|
<TablePagination
|
||||||
colSpan={1}
|
colSpan={1}
|
||||||
hasNextPage={true}
|
hasNextPage={true}
|
||||||
|
@ -40,10 +40,10 @@ storiesOf("Generics / TablePagination", module)
|
||||||
onPreviousPage={undefined}
|
onPreviousPage={undefined}
|
||||||
onNextPage={undefined}
|
onNextPage={undefined}
|
||||||
/>
|
/>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
))
|
))
|
||||||
.add("both previous and next pages are available", () => (
|
.add("both previous and next pages are available", () => (
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TablePagination
|
<TablePagination
|
||||||
colSpan={1}
|
colSpan={1}
|
||||||
hasNextPage={true}
|
hasNextPage={true}
|
||||||
|
@ -51,5 +51,5 @@ storiesOf("Generics / TablePagination", module)
|
||||||
onPreviousPage={undefined}
|
onPreviousPage={undefined}
|
||||||
onNextPage={undefined}
|
onNextPage={undefined}
|
||||||
/>
|
/>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
));
|
));
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableHead from "@material-ui/core/TableHead";
|
import TableHead from "@material-ui/core/TableHead";
|
||||||
|
@ -9,6 +8,7 @@ import classNames from "classnames";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { FormattedMessage } from "react-intl";
|
import { FormattedMessage } from "react-intl";
|
||||||
|
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import { maybe, renderCollection } from "../../../misc";
|
import { maybe, renderCollection } from "../../../misc";
|
||||||
import { CountryList_shop_countries } from "../../types/CountryList";
|
import { CountryList_shop_countries } from "../../types/CountryList";
|
||||||
|
@ -34,7 +34,7 @@ const CountryList: React.FC<CountryListProps> = props => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
|
@ -83,7 +83,7 @@ const CountryList: React.FC<CountryListProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableHead from "@material-ui/core/TableHead";
|
import TableHead from "@material-ui/core/TableHead";
|
||||||
|
@ -12,6 +11,7 @@ import AppHeader from "@saleor/components/AppHeader";
|
||||||
import { Container } from "@saleor/components/Container";
|
import { Container } from "@saleor/components/Container";
|
||||||
import Grid from "@saleor/components/Grid";
|
import Grid from "@saleor/components/Grid";
|
||||||
import PageHeader from "@saleor/components/PageHeader";
|
import PageHeader from "@saleor/components/PageHeader";
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import { sectionNames } from "@saleor/intl";
|
import { sectionNames } from "@saleor/intl";
|
||||||
import { TaxRateType } from "@saleor/types/globalTypes";
|
import { TaxRateType } from "@saleor/types/globalTypes";
|
||||||
|
@ -165,7 +165,7 @@ const CountryTaxesPage: React.FC<CountryTaxesPageProps> = props => {
|
||||||
<Grid>
|
<Grid>
|
||||||
<div>
|
<div>
|
||||||
<Card>
|
<Card>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell className={classes.wideColumn}>
|
<TableCell className={classes.wideColumn}>
|
||||||
|
@ -206,7 +206,7 @@ const CountryTaxesPage: React.FC<CountryTaxesPageProps> = props => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { Omit } from "@material-ui/core";
|
import { Omit } from "@material-ui/core";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -12,6 +11,7 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
import { ListProps } from "../../../types";
|
import { ListProps } from "../../../types";
|
||||||
|
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import TablePagination from "@saleor/components/TablePagination";
|
import TablePagination from "@saleor/components/TablePagination";
|
||||||
import { maybe, renderCollection } from "../../../misc";
|
import { maybe, renderCollection } from "../../../misc";
|
||||||
|
@ -58,7 +58,7 @@ const TranslationsEntitiesList: React.FC<
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell className={classes.wideColumn}>
|
<TableCell className={classes.wideColumn}>
|
||||||
|
@ -126,7 +126,7 @@ const TranslationsEntitiesList: React.FC<
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
TranslationsEntitiesList.displayName = "TranslationsEntitiesList";
|
TranslationsEntitiesList.displayName = "TranslationsEntitiesList";
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import Card from "@material-ui/core/Card";
|
import Card from "@material-ui/core/Card";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableHead from "@material-ui/core/TableHead";
|
import TableHead from "@material-ui/core/TableHead";
|
||||||
|
@ -8,6 +7,7 @@ import TableRow from "@material-ui/core/TableRow";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { FormattedMessage } from "react-intl";
|
import { FormattedMessage } from "react-intl";
|
||||||
|
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import { ShopInfo_shop_languages } from "@saleor/components/Shop/types/ShopInfo";
|
import { ShopInfo_shop_languages } from "@saleor/components/Shop/types/ShopInfo";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import { maybe, renderCollection } from "../../../misc";
|
import { maybe, renderCollection } from "../../../misc";
|
||||||
|
@ -35,7 +35,7 @@ const TranslationsLanguageList: React.FC<
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card>
|
||||||
<Table>
|
<ResponsiveTable>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
|
@ -70,7 +70,7 @@ const TranslationsLanguageList: React.FC<
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import IconButton from "@material-ui/core/IconButton";
|
import IconButton from "@material-ui/core/IconButton";
|
||||||
import makeStyles from "@material-ui/core/styles/makeStyles";
|
import makeStyles from "@material-ui/core/styles/makeStyles";
|
||||||
import Table from "@material-ui/core/Table";
|
|
||||||
import TableBody from "@material-ui/core/TableBody";
|
import TableBody from "@material-ui/core/TableBody";
|
||||||
import TableCell from "@material-ui/core/TableCell";
|
import TableCell from "@material-ui/core/TableCell";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
|
@ -11,6 +10,7 @@ import EditIcon from "@material-ui/icons/Edit";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useIntl } from "react-intl";
|
import { useIntl } from "react-intl";
|
||||||
|
|
||||||
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import TablePagination from "@saleor/components/TablePagination";
|
import TablePagination from "@saleor/components/TablePagination";
|
||||||
import { maybe, renderCollection, stopPropagation } from "@saleor/misc";
|
import { maybe, renderCollection, stopPropagation } from "@saleor/misc";
|
||||||
|
@ -68,7 +68,7 @@ const WebhooksList: React.FC<WebhooksListProps> = ({
|
||||||
const classes = useStyles({});
|
const classes = useStyles({});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table className={classes.table}>
|
<ResponsiveTable className={classes.table}>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell className={classes.colName}>
|
<TableCell className={classes.colName}>
|
||||||
|
@ -156,7 +156,7 @@ const WebhooksList: React.FC<WebhooksListProps> = ({
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</ResponsiveTable>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
WebhooksList.displayName = "WebhooksList";
|
WebhooksList.displayName = "WebhooksList";
|
||||||
|
|
Loading…
Reference in a new issue