summaryrefslogtreecommitdiff
path: root/packages/demobank-ui/src/components/Transactions/views.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-10-19 09:02:45 -0300
committerSebastian <sebasjm@gmail.com>2023-10-19 09:02:45 -0300
commit6bc2ca85e7238dbd9a88643e540a73cee6c918c7 (patch)
treea2df12d2f4e75cfb8513ebcdf8e445864bd69b38 /packages/demobank-ui/src/components/Transactions/views.tsx
parent366cccb8fcae6a9971a1e8a9143d821e289339d1 (diff)
downloadwallet-core-6bc2ca85e7238dbd9a88643e540a73cee6c918c7.tar.gz
wallet-core-6bc2ca85e7238dbd9a88643e540a73cee6c918c7.tar.bz2
wallet-core-6bc2ca85e7238dbd9a88643e540a73cee6c918c7.zip
mobile for side menu
Diffstat (limited to 'packages/demobank-ui/src/components/Transactions/views.tsx')
-rw-r--r--packages/demobank-ui/src/components/Transactions/views.tsx12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/demobank-ui/src/components/Transactions/views.tsx b/packages/demobank-ui/src/components/Transactions/views.tsx
index 696fb59f3..404e25619 100644
--- a/packages/demobank-ui/src/components/Transactions/views.tsx
+++ b/packages/demobank-ui/src/components/Transactions/views.tsx
@@ -14,13 +14,11 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
-import { Fragment, h, VNode } from "preact";
import { useTranslationContext } from "@gnu-taler/web-util/browser";
-import { State } from "./index.js";
-import { format, isToday } from "date-fns";
-import { Amounts } from "@gnu-taler/taler-util";
-import { useEffect, useRef } from "preact/hooks";
+import { format } from "date-fns";
+import { Fragment, h, VNode } from "preact";
import { RenderAmount } from "../../pages/PaytoWireTransferForm.js";
+import { State } from "./index.js";
export function LoadingUriView({ error }: State.LoadingUriError): VNode {
const { i18n } = useTranslationContext();
@@ -82,7 +80,9 @@ export function ReadyView({ transactions, onNext, onPrev }: State.Ready): VNode
<dt class="sr-only sm:hidden"><i18n.Translate>Amount</i18n.Translate></dt>
<dd class="mt-1 truncate text-gray-700">
{item.negative ? i18n.str`sent` : i18n.str`received`} {item.amount ? (
- <RenderAmount value={item.amount} />
+ <span data-negative={item.negative ? "true" : "false"} class="data-[negative=false]:text-green-600 data-[negative=true]:text-red-600">
+ <RenderAmount value={item.amount} />
+ </span>
) : (
<span style={{ color: "grey" }}>&lt;{i18n.str`invalid value`}&gt;</span>
)}</dd>