2021-08-23 21:51:49 +02:00
|
|
|
import { ComponentChildren, FunctionalComponent, h as render } from 'preact';
|
2021-08-19 05:34:47 +02:00
|
|
|
|
|
|
|
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);' })
|
|
|
|
}
|