Icon component; header component nearly finished

This commit is contained in:
2024-08-05 09:57:34 +03:00
parent f021b80892
commit f08d4b1a70
9 changed files with 153 additions and 6 deletions

View File

@@ -0,0 +1,31 @@
<script>
export let type = "left";
let rule = "";
if (type == "left") {
rule = "margin-left: auto";
}
if (type == "right") {
rule = "margin-right: auto";
}
if (type == "top") {
rule = "margin-top: auto";
}
if (type == "bottom") {
rule = "margin-bottom: auto";
}
if (type == "vertical") {
rule = "margin-top: auto; margin-bottom: auto";
}
if (type == "horizontal") {
rule = "margin-left: auto; margin-right: auto";
}
if (rule == "") {
console.error("Invalid spacer type: " + type);
}
</script>
<div class="spacer" style="{rule}"/>