Compare commits
No commits in common. "ee882283ad9f22f8432faa9bb817adb5ab661e37" and "eaa6c7534d04f4b73188f567dbbd9433232e1f8a" have entirely different histories.
ee882283ad
...
eaa6c7534d
@ -2,7 +2,6 @@ import { TempstreamJSX } from "tempstream";
|
|||||||
import type { ComponentToHTMLArgs } from "@sealcode/jdd";
|
import type { ComponentToHTMLArgs } from "@sealcode/jdd";
|
||||||
import { Component, ComponentArguments, insert_nbsp } from "@sealcode/jdd";
|
import { Component, ComponentArguments, insert_nbsp } from "@sealcode/jdd";
|
||||||
import { button, button_variants } from "src/back/elements/button.js";
|
import { button, button_variants } from "src/back/elements/button.js";
|
||||||
import { getAllIconNames } from "src/back/icons.js";
|
|
||||||
|
|
||||||
const component_arguments = {
|
const component_arguments = {
|
||||||
mode: new ComponentArguments.Enum(["column", "row"]),
|
mode: new ComponentArguments.Enum(["column", "row"]),
|
||||||
@ -13,10 +12,6 @@ const component_arguments = {
|
|||||||
buttons: new ComponentArguments.List(
|
buttons: new ComponentArguments.List(
|
||||||
new ComponentArguments.Structured({
|
new ComponentArguments.Structured({
|
||||||
variant: new ComponentArguments.Enum(button_variants),
|
variant: new ComponentArguments.Enum(button_variants),
|
||||||
icon: new ComponentArguments.Enum(async () => [
|
|
||||||
"none",
|
|
||||||
...(await getAllIconNames()),
|
|
||||||
]).setDefaultValue("none"),
|
|
||||||
text: new ComponentArguments.ShortText(),
|
text: new ComponentArguments.ShortText(),
|
||||||
href: new ComponentArguments.ShortText(),
|
href: new ComponentArguments.ShortText(),
|
||||||
size: new ComponentArguments.Enum([
|
size: new ComponentArguments.Enum([
|
||||||
@ -52,7 +47,6 @@ export class Buttons extends Component<typeof component_arguments> {
|
|||||||
{buttons.map((b) =>
|
{buttons.map((b) =>
|
||||||
button({
|
button({
|
||||||
...b,
|
...b,
|
||||||
icon: b.icon == "none" ? undefined : b.icon,
|
|
||||||
text: insert_nbsp(b.text),
|
text: insert_nbsp(b.text),
|
||||||
classes: [`button--size-${b.size}`],
|
classes: [`button--size-${b.size}`],
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user