wallet-core/packages/taler-wallet-webextension/src/test-utils.ts

13 lines
404 B
TypeScript
Raw Normal View History

2021-08-23 21:51:49 +02:00
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
}
2021-08-23 21:51:49 +02:00
export function NullLink({ children }: { children?: ComponentChildren }) {
return render('a', { children, href: 'javascript:void(0);' })
}