summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/components/Part.tsx
blob: 87b16de871f357a64b82ded2d8873784affd0d47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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>
}