Current section

Files

Jump to
chilp src chilp.erl
Raw

src/chilp.erl

-module(chilp).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
-define(FILEPATH, "src/chilp.gleam").
-export([widget/2]).
-if(?OTP_RELEASE >= 27).
-define(MODULEDOC(Str), -moduledoc(Str)).
-define(DOC(Str), -doc(Str)).
-else.
-define(MODULEDOC(Str), -compile([])).
-define(DOC(Str), -compile([])).
-endif.
-file("src/chilp.gleam", 7).
?DOC(
" Widget component!\n"
" Before adding this component make sure to call `widget.register()` to register it!\n"
"\n"
" This component adds in inline CSS, to not do this, use `widget.element(\"bla\", \"111\", False)` instead.\n"
).
-spec widget(binary(), binary()) -> lustre@vdom@vnode:element(any()).
widget(Instance, Post) ->
chilp@widget:element(Instance, Post, true).