aboutsummaryrefslogtreecommitdiff
path: root/packages/exchange-backoffice-ui/src/handlers/Separator.tsx
blob: 5fa25c3caffd289e20dc7c60d02e183ffbfc449c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { VNode, h } from "preact";
import {
  InputLine,
  LabelWithTooltipMaybeRequired,
  UIFormProps,
} from "./InputLine.js";
import { TranslatedString } from "@gnu-taler/taler-util";

interface Props {
  label: TranslatedString;
  tooltip?: TranslatedString;
  help?: TranslatedString;
}

export function Separator({ label, tooltip, help }: Props): VNode {
  return (
    <div class="sm:col-span-6">
      <LabelWithTooltipMaybeRequired label={label} tooltip={tooltip} />
      {help && (
        <p class="mt-2 text-sm text-gray-500" id="email-description">
          {help}
        </p>
      )}
    </div>
  );
}