diff --git a/src/components/AppLayout/MenuList.tsx b/src/components/AppLayout/MenuList.tsx index 410ac2301..4e29d600b 100644 --- a/src/components/AppLayout/MenuList.tsx +++ b/src/components/AppLayout/MenuList.tsx @@ -101,7 +101,7 @@ const useStyles = makeStyles(theme => ({ content: "''", height: 0, position: "absolute", - right: -35, + right: -30, top: 15, width: 0 }, diff --git a/src/components/AppLayout/MenuNested.tsx b/src/components/AppLayout/MenuNested.tsx index 314156aa9..39ccd41bc 100644 --- a/src/components/AppLayout/MenuNested.tsx +++ b/src/components/AppLayout/MenuNested.tsx @@ -8,7 +8,11 @@ import SVG from "react-inlinesvg"; import menuArrowIcon from "@assets/images/menu-arrow-icon.svg"; import useTheme from "@saleor/hooks/useTheme"; import { createHref } from "@saleor/misc"; -import { drawerWidthExpanded, drawerWidthExpandedMobile } from "./consts"; +import { + drawerNestedMenuWidth, + drawerWidthExpanded, + drawerWidthExpandedMobile +} from "./consts"; import { IActiveSubMenu } from "./MenuList"; import { IMenuItem } from "./menuStructure"; @@ -20,7 +24,7 @@ const useStyles = makeStyles(theme => ({ right: 0, top: 0, transition: `right ${theme.transitions.duration.shorter}ms ease`, - width: 300, + width: drawerNestedMenuWidth, zIndex: -1 }, menuListNestedClose: { @@ -74,8 +78,8 @@ const useStyles = makeStyles(theme => ({ width: drawerWidthExpandedMobile, zIndex: 2 }, - right: -300, - width: drawerWidthExpanded, + right: -drawerNestedMenuWidth, + width: drawerNestedMenuWidth, zIndex: -1 }, subHeader: { diff --git a/src/components/AppLayout/consts.ts b/src/components/AppLayout/consts.ts index a513c3112..b5184b016 100644 --- a/src/components/AppLayout/consts.ts +++ b/src/components/AppLayout/consts.ts @@ -1,5 +1,6 @@ export const drawerWidthExpanded = 210; export const drawerWidthExpandedMobile = 250; export const drawerWidth = 80; +export const drawerNestedMenuWidth = 300; export const navigationBarHeight = 64; export const appLoaderHeight = 4; diff --git a/src/components/ColumnPicker/ColumnPicker.tsx b/src/components/ColumnPicker/ColumnPicker.tsx index 83b05f306..f2a1c9434 100644 --- a/src/components/ColumnPicker/ColumnPicker.tsx +++ b/src/components/ColumnPicker/ColumnPicker.tsx @@ -28,7 +28,7 @@ const useStyles = makeStyles( theme => ({ popper: { boxShadow: `0px 5px 10px 0 ${fade(theme.palette.common.black, 0.05)}`, - marginTop: theme.spacing(2), + marginTop: theme.spacing(1), zIndex: 2 } }), diff --git a/src/components/ColumnPicker/ColumnPickerContent.tsx b/src/components/ColumnPicker/ColumnPickerContent.tsx index 5977f5f55..7ea3e865f 100644 --- a/src/components/ColumnPicker/ColumnPickerContent.tsx +++ b/src/components/ColumnPicker/ColumnPickerContent.tsx @@ -69,6 +69,9 @@ const useStyles = makeStyles(theme => ({ }, root: { boxShadow: "0px 4px 4px rgba(0, 0, 0, 0.25)" + }, + titleContainer: { + padding: theme.spacing(1.5, 3.5) } })); @@ -97,7 +100,7 @@ const ColumnPickerContent: React.FC = props => { return ( - + ({ - action: { - flex: "0 0 auto", - [theme.breakpoints.down("sm")]: { - marginTop: theme.spacing() +const useStyles = makeStyles( + theme => ({ + action: { + flex: "0 0 auto", + [theme.breakpoints.down("sm")]: { + marginTop: theme.spacing() + } + }, + block: { + [theme.breakpoints.down("sm")]: { + "&&": { + display: "block" + } + } + }, + grid: { + padding: theme.spacing(2) + }, + menuButton: { + flex: "0 0 auto", + marginLeft: -theme.spacing(2), + marginRight: theme.spacing(3), + marginTop: -theme.spacing(2) + }, + root: { + alignItems: "center", + display: "flex", + marginBottom: theme.spacing(3) + }, + subtitle: { + alignItems: "center", + display: "flex", + marginBottom: theme.spacing(2) + }, + title: { + flex: 1, + paddingBottom: theme.spacing(2) } - }, - grid: { - padding: theme.spacing(2) - }, - menuButton: { - flex: "0 0 auto", - marginLeft: -theme.spacing(2), - marginRight: theme.spacing(3), - marginTop: -theme.spacing(2) - }, - root: { - alignItems: "center", - display: "flex", - marginBottom: theme.spacing(3), - [theme.breakpoints.down("sm")]: { - display: "block" - } - }, - subtitle: { - alignItems: "center", - display: "flex", - marginBottom: theme.spacing(2) - }, - title: { - flex: 1, - paddingBottom: theme.spacing(2) + }), + { + name: "ExtendedPageHeader" } -})); +); interface ExtendedPageHeaderProps { children?: React.ReactNode; className?: string; + inline?: boolean; title?: React.ReactNode; } const ExtendedPageHeader: React.FC = props => { - const { children, className, title } = props; + const { children, className, inline, title } = props; const classes = useStyles(props); return ( -
+
{title}
{children}
diff --git a/src/components/PageHeader/PageHeader.tsx b/src/components/PageHeader/PageHeader.tsx index 515e9aa9f..d1457663b 100644 --- a/src/components/PageHeader/PageHeader.tsx +++ b/src/components/PageHeader/PageHeader.tsx @@ -15,26 +15,28 @@ const useStyles = makeStyles(theme => ({ marginTop: theme.spacing(2), padding: 0 }, + alignSelf: "flex-start", flex: 1, - fontSize: 24, - paddingBottom: theme.spacing(2) + fontSize: 24 } })); interface PageHeaderProps { children?: React.ReactNode; className?: string; + inline?: boolean; title?: string; } const PageHeader: React.FC = props => { - const { children, className, title } = props; + const { children, className, inline, title } = props; const classes = useStyles(props); return ( {title !== undefined ? title : } diff --git a/src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx b/src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx index 9e53e3851..886d46d9c 100644 --- a/src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx +++ b/src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx @@ -23,16 +23,21 @@ import OrderHistory, { FormData as HistoryFormData } from "../OrderHistory"; import OrderPayment from "../OrderPayment/OrderPayment"; import OrderUnfulfilledItems from "../OrderUnfulfilledItems/OrderUnfulfilledItems"; -const useStyles = makeStyles(theme => ({ - date: { - marginBottom: theme.spacing(3), - marginTop: -theme.spacing(2) - }, - header: { - display: "flex", - marginBottom: 0 +const useStyles = makeStyles( + theme => ({ + date: { + marginBottom: theme.spacing(3), + marginTop: -theme.spacing(2) + }, + header: { + display: "flex", + marginBottom: 0 + } + }), + { + name: "OrderDetailsPage" } -})); +); export interface OrderDetailsPageProps extends UserPermissionProps { order: OrderDetails_order; @@ -96,6 +101,7 @@ const OrderDetailsPage: React.FC = props => { order.number) ? "#" + order.number : undefined} > {canCancel && ( diff --git a/src/orders/components/OrderDraftPage/OrderDraftPage.tsx b/src/orders/components/OrderDraftPage/OrderDraftPage.tsx index 77cf46f3a..dbe3ea00c 100644 --- a/src/orders/components/OrderDraftPage/OrderDraftPage.tsx +++ b/src/orders/components/OrderDraftPage/OrderDraftPage.tsx @@ -25,10 +25,10 @@ import OrderHistory, { FormData as HistoryFormData } from "../OrderHistory"; const useStyles = makeStyles(theme => ({ date: { - marginBottom: theme.spacing(3), - marginLeft: theme.spacing(7) + marginBottom: theme.spacing(3) }, header: { + display: "flex", marginBottom: 0 } })); @@ -99,6 +99,7 @@ const OrderDraftPage: React.FC = props => { order.number) ? "#" + order.number : undefined} >