You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
423 B

import { Props } from "../types.d.ts";
import { h } from "../jsx.ts";
interface BaseScriptProps extends Props {
// deno-lint-ignore ban-types
function?: Function;
// deno-lint-ignore no-explicit-any
children?: any;
}
export default (props: BaseScriptProps) => (
<script>
{props.function ? `(${props.function.toString()})();` : undefined}
{props.children ?? undefined}
</script>
);