From 203c5ba696ecad3b1d2a2f23caf8b40983bb16ee Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Thu, 3 Sep 2020 19:01:32 +0200 Subject: [PATCH] Update savebar design --- .../SaveButtonBar/SaveButtonBar.tsx | 103 ++++++++---------- 1 file changed, 48 insertions(+), 55 deletions(-) diff --git a/src/components/SaveButtonBar/SaveButtonBar.tsx b/src/components/SaveButtonBar/SaveButtonBar.tsx index 31944dfe1..adf2bdcdb 100644 --- a/src/components/SaveButtonBar/SaveButtonBar.tsx +++ b/src/components/SaveButtonBar/SaveButtonBar.tsx @@ -1,9 +1,10 @@ import Button from "@material-ui/core/Button"; +import Card from "@material-ui/core/Card"; +import CardContent from "@material-ui/core/CardContent"; import Portal from "@material-ui/core/Portal"; import { makeStyles } from "@material-ui/core/styles"; import useWindowScroll from "@saleor/hooks/useWindowScroll"; import { buttonMessages } from "@saleor/intl"; -import classNames from "classnames"; import React from "react"; import { useIntl } from "react-intl"; @@ -22,7 +23,10 @@ const useStyles = makeStyles( cancelButton: { marginRight: theme.spacing(2) }, - container: { + content: { + "&:last-child": { + paddingBottom: theme.spacing(2) + }, display: "flex", paddingBottom: theme.spacing(2), paddingTop: theme.spacing(2), @@ -38,20 +42,10 @@ const useStyles = makeStyles( color: theme.palette.error.contrastText }, root: { - background: theme.palette.background.default, - borderTop: "1px solid transparent", - boxShadow: `0 -5px 5px 0 ${theme.palette.divider}`, - height: 70, - transition: `box-shadow ${theme.transitions.duration.shortest}ms` + height: 120 }, spacer: { flex: "1" - }, - stop: { - "&$root": { - borderTopColor: theme.palette.divider, - boxShadow: `0 0 0 0 ${theme.palette.divider}` - } } }), { name: "SaveButtonBar" } @@ -92,48 +86,47 @@ export const SaveButtonBar: React.FC = props => { {anchor => anchor ? ( -
- - {!!onDelete && ( - - )} -
- - - {maybe( - () => labels.save, - intl.formatMessage(buttonMessages.save) - )} - +
+ + + + {!!onDelete && ( + + )} +
+ + + {maybe( + () => labels.save, + intl.formatMessage(buttonMessages.save) + )} + + +