From d0d542e82a3990c444dff19853715a7efe66e63a Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 2 Jul 2019 16:57:48 +0400 Subject: [PATCH] fix mui button styles --- src/components/layout/Button/index.jsx | 19 +++++++------------ src/routes/safe/components/Balances/index.jsx | 12 +++++++----- .../Settings/ChangeSafeName/index.jsx | 9 ++------- .../Settings/ChangeSafeName/style.js | 6 +++++- src/theme/mui.js | 3 +++ 5 files changed, 24 insertions(+), 25 deletions(-) diff --git a/src/components/layout/Button/index.jsx b/src/components/layout/Button/index.jsx index da77f1f2..b68d2980 100644 --- a/src/components/layout/Button/index.jsx +++ b/src/components/layout/Button/index.jsx @@ -1,31 +1,26 @@ // @flow import * as React from 'react' import Button from '@material-ui/core/Button' -import { withStyles } from '@material-ui/core/styles' - -const styles = { - root: { - borderRadius: 0, - }, -} type Props = { minWidth?: number, minHeight?: number, - testId: string, + rounded?: boolean, + testId?: string, } -const calculateStyleBased = (minWidth, minHeight) => ({ +const calculateStyleBased = (minWidth, minHeight, rounded) => ({ minWidth: minWidth && `${minWidth}px`, minHeight: minHeight && `${minHeight}px`, + borderRadius: rounded ? '4px' : 0, }) const GnoButton = ({ - minWidth, minHeight, testId = '', ...props + minWidth, minHeight = 27, testId = '', rounded, ...props }: Props) => { - const style = calculateStyleBased(minWidth, minHeight) + const style = calculateStyleBased(minWidth, minHeight, rounded) return