From b153a23f25d0a6ba7231654d20d52baf036f7d21 Mon Sep 17 00:00:00 2001 From: Taranto Date: Mon, 10 Aug 2020 11:51:21 +0100 Subject: [PATCH] fix: small component fixes --- new-lamassu-admin/src/components/Status.js | 2 +- new-lamassu-admin/src/components/editableTable/Row.js | 5 ++++- new-lamassu-admin/src/components/table/TableHeader.js | 4 ++-- new-lamassu-admin/src/pages/Funding.js | 7 ++++++- new-lamassu-admin/src/pages/Funding.styles.js | 6 ++++++ new-lamassu-admin/src/pages/MachineLogs.js | 4 ++-- new-lamassu-admin/src/pages/ServerLogs.js | 4 ++-- 7 files changed, 23 insertions(+), 9 deletions(-) diff --git a/new-lamassu-admin/src/components/Status.js b/new-lamassu-admin/src/components/Status.js index cca3639f..31c764e9 100644 --- a/new-lamassu-admin/src/components/Status.js +++ b/new-lamassu-admin/src/components/Status.js @@ -33,7 +33,7 @@ const useStyles = makeStyles({ marginRight: spacer / 4, marginBottom: spacer / 2, marginLeft: spacer / 4, - height: 18, + height: spacer * 3, backgroundColor: ({ type }) => backgroundColors[type] }, label: { diff --git a/new-lamassu-admin/src/components/editableTable/Row.js b/new-lamassu-admin/src/components/editableTable/Row.js index 01476669..be538660 100644 --- a/new-lamassu-admin/src/components/editableTable/Row.js +++ b/new-lamassu-admin/src/components/editableTable/Row.js @@ -100,6 +100,7 @@ const ECol = ({ width, textAlign, suffix, + SuffixComponent = TL2, view = it => it?.toString(), inputProps = {} } = config @@ -137,7 +138,9 @@ const ECol = ({ ) : ( values && <>{view(values[name])} )} - {suffix && {suffix}} + {suffix && ( + {suffix} + )} ) } diff --git a/new-lamassu-admin/src/components/table/TableHeader.js b/new-lamassu-admin/src/components/table/TableHeader.js index 23019850..0318f055 100644 --- a/new-lamassu-admin/src/components/table/TableHeader.js +++ b/new-lamassu-admin/src/components/table/TableHeader.js @@ -10,11 +10,11 @@ import { white } from 'src/styling/variables' -const { label2 } = typographyStyles +const { tl2 } = typographyStyles const useStyles = makeStyles({ th: { - extend: label2, + extend: tl2, backgroundColor: tableHeaderColor, height: tableHeaderHeight, textAlign: 'left', diff --git a/new-lamassu-admin/src/pages/Funding.js b/new-lamassu-admin/src/pages/Funding.js index 125550d0..44cbeb55 100644 --- a/new-lamassu-admin/src/pages/Funding.js +++ b/new-lamassu-admin/src/pages/Funding.js @@ -20,6 +20,7 @@ import { Label1, Label3 } from 'src/components/typography' +import CopyToClipboard from 'src/pages/Transactions/CopyToClipboard' import { primaryColor } from 'src/styling/variables' import styles from './Funding.styles' @@ -199,7 +200,11 @@ const Funding = () => {

Address

- {formatAddress(selected.fundingAddress)} + + + {formatAddress(selected.fundingAddress)} + +
diff --git a/new-lamassu-admin/src/pages/Funding.styles.js b/new-lamassu-admin/src/pages/Funding.styles.js index e4a60dff..4f9591fe 100644 --- a/new-lamassu-admin/src/pages/Funding.styles.js +++ b/new-lamassu-admin/src/pages/Funding.styles.js @@ -85,5 +85,11 @@ export default { }, pending: { backgroundColor: disabledColor2 + }, + copyToClipboard: { + marginLeft: 'auto', + paddingTop: 6, + paddingLeft: 15, + marginRight: -11 } } diff --git a/new-lamassu-admin/src/pages/MachineLogs.js b/new-lamassu-admin/src/pages/MachineLogs.js index 5059c738..322a8a43 100644 --- a/new-lamassu-admin/src/pages/MachineLogs.js +++ b/new-lamassu-admin/src/pages/MachineLogs.js @@ -17,7 +17,7 @@ import { TableBody, TableCell } from 'src/components/table' -import { Info3 } from 'src/components/typography' +import { Label1, Info3 } from 'src/components/typography' import { ReactComponent as WhiteShareIcon } from 'src/styling/icons/circle buttons/share/white.svg' import { ReactComponent as ShareIcon } from 'src/styling/icons/circle buttons/share/zodiac.svg' @@ -118,7 +118,7 @@ const Logs = () => { Icon={ShareIcon} InverseIcon={WhiteShareIcon} onClick={sendSnapshot}> - Share with Lamassu + Share with Lamassu {saveMessage} diff --git a/new-lamassu-admin/src/pages/ServerLogs.js b/new-lamassu-admin/src/pages/ServerLogs.js index 624261b5..aa989730 100644 --- a/new-lamassu-admin/src/pages/ServerLogs.js +++ b/new-lamassu-admin/src/pages/ServerLogs.js @@ -18,7 +18,7 @@ import { TableBody, TableCell } from 'src/components/table' -import { Info3 } from 'src/components/typography' +import { Label1, Info3 } from 'src/components/typography' import typographyStyles from 'src/components/typography/styles' import { ReactComponent as WhiteShareIcon } from 'src/styling/icons/circle buttons/share/white.svg' import { ReactComponent as ShareIcon } from 'src/styling/icons/circle buttons/share/zodiac.svg' @@ -128,7 +128,7 @@ const Logs = () => { Icon={ShareIcon} InverseIcon={WhiteShareIcon} onClick={sendSnapshot}> - Share with Lamassu + Share with Lamassu {saveMessage}