summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/test-utils.ts
blob: 7ef47b31451e094c60cc6e0559e5509bf702ae6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import { ComponentChildren, FunctionalComponent, h as render } from 'preact';

export function createExample<Props>(Component: FunctionalComponent<Props>, props: Partial<Props>) {
  const r = (args: any) => render(Component, args)
  r.args = props
  return r
}


export function NullLink({ children }: { children?: ComponentChildren }) {
  return render('a', { children, href: 'javascript:void(0);' })
}