diff options
author | Sebastian <sebasjm@gmail.com> | 2021-09-08 15:30:32 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2021-09-08 15:35:44 -0300 |
commit | 217f34397f95fc988280eee9c376efe0781c69ea (patch) | |
tree | 8cfb4011a7ddcb7409b7617ec8ac1425d08b1512 /packages/taler-wallet-webextension/src/components/Part.tsx | |
parent | a72ec5971e7c65e13a22627fc52983b75d4bea71 (diff) | |
download | wallet-core-217f34397f95fc988280eee9c376efe0781c69ea.tar.xz |
first approach to new design for withdraw
Diffstat (limited to 'packages/taler-wallet-webextension/src/components/Part.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/components/Part.tsx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/taler-wallet-webextension/src/components/Part.tsx b/packages/taler-wallet-webextension/src/components/Part.tsx new file mode 100644 index 000000000..87b16de87 --- /dev/null +++ b/packages/taler-wallet-webextension/src/components/Part.tsx @@ -0,0 +1,16 @@ +import { AmountLike } from "@gnu-taler/taler-util"; +import { ExtraLargeText, LargeText, SmallLightText } from "./styled"; + +export type Kind = 'positive' | 'negative' | 'neutral'; +interface Props { + title: string, text: AmountLike, kind: Kind, big?: boolean +} +export function Part({ text, title, kind, big }: Props) { + const Text = big ? ExtraLargeText : LargeText; + return <div style={{ margin: '1em' }}> + <SmallLightText style={{ margin: '.5em' }}>{title}</SmallLightText> + <Text style={{ color: kind == 'positive' ? 'green' : (kind == 'negative' ? 'red' : 'black') }}> + {text} + </Text> + </div> +} |