From d279733fd72a72659d94b28099049ba1b9fa6dc3 Mon Sep 17 00:00:00 2001 From: Daniel Ternyak Date: Sun, 24 Dec 2017 15:56:40 -0600 Subject: [PATCH] Broadcast UI Cleanup (#658) * add onlyTransactionParameters prop to SendButtonFactory to only show Transaction Parameters and not the serialized TX. Useful in Broadcast Signed Transaction so that the user is not presented with redundant data. * add and pass onlyTransactionParameters props through SendButton from BroadcastTx * Adjusted spacing of broadcast tx * Move the qr code styles into css. --- common/components/SendButton.tsx | 5 ++- .../SendButtonFactory/SendButtonFactory.tsx | 33 +++++++++++-------- common/containers/Tabs/BroadcastTx/index.scss | 14 ++++++-- common/containers/Tabs/BroadcastTx/index.tsx | 25 +++++--------- 4 files changed, 43 insertions(+), 34 deletions(-) diff --git a/common/components/SendButton.tsx b/common/components/SendButton.tsx index 6495fd54..7840f24f 100644 --- a/common/components/SendButton.tsx +++ b/common/components/SendButton.tsx @@ -2,8 +2,11 @@ import React from 'react'; import { SendButtonFactory } from './SendButtonFactory'; import translate from 'translations'; -export const SendButton: React.SFC<{}> = () => ( +export const SendButton: React.SFC<{ onlyTransactionParameters?: boolean }> = ({ + onlyTransactionParameters +}) => ( (
diff --git a/common/components/SendButtonFactory/SendButtonFactory.tsx b/common/components/SendButtonFactory/SendButtonFactory.tsx index 86280f69..4af374b5 100644 --- a/common/components/SendButtonFactory/SendButtonFactory.tsx +++ b/common/components/SendButtonFactory/SendButtonFactory.tsx @@ -18,6 +18,7 @@ interface StateProps { walletType: IWalletType; } interface OwnProps { + onlyTransactionParameters?: boolean; withProps(props: CallbackProps): React.ReactElement | null; } @@ -27,11 +28,13 @@ const getStringifiedTx = (serializedTransaction: string) => type Props = StateProps & OwnProps; class SendButtonFactoryClass extends Component { public render() { + const { onlyTransactionParameters } = this.props; + const columnSize = onlyTransactionParameters ? 12 : 6; return ( ( -
+
-
- -