replace styled components

This commit is contained in:
tristan 2024-01-01 06:33:57 +00:00
parent 003100e691
commit 30ffa6c9b3
11 changed files with 388 additions and 444 deletions

View file

@ -1,9 +1,9 @@
let
keyvalue = key: value:
assert builtins.isString key;
if builtins.isAttrs value then
builtins.trace "Skipping ${key} as it is a set" "" else
if value == "" || value == [ ] then
if builtins.isAttrs value then
builtins.trace "Skipping ${key} as it is a set" ""
else if value == "" || value == [ ] then
""
else
''${key}="${toString value}"'';
@ -37,7 +37,9 @@ in rec {
inherit tag attrs;
__functor = self: child:
if !(isTag child) then
throw "tag child must be tag, list, or string"
throw "tag child must be tag, list, or string, got ${
builtins.typeOf child
}"
else {
inherit tag attrs child;
__toString = toHTML;