Fix unnecessary clickable links in dynamic grid
This commit is contained in:
parent
83fe4c4872
commit
f844ca660f
@ -22,13 +22,21 @@ const component_arguments = {
|
||||
new ComponentArguments.Structured({
|
||||
title: new ComponentArguments.ShortText(),
|
||||
subtitle: new ComponentArguments.ShortText(),
|
||||
url: new ComponentArguments.ShortText(),
|
||||
url: new ComponentArguments.ShortText().setDefaultValue(""),
|
||||
photo: new ComponentArguments.Structured({
|
||||
image: new ComponentArguments.Image(),
|
||||
alt: new ComponentArguments.ShortText(),
|
||||
}),
|
||||
shape: new ComponentArguments.Enum(["square", "horizontal", "vertical"]),
|
||||
background: new ComponentArguments.Enum(["accent", "accent2", "text-bg"]),
|
||||
shape: new ComponentArguments.Enum([
|
||||
"square",
|
||||
"horizontal",
|
||||
"vertical",
|
||||
]).setDefaultValue("square"),
|
||||
background: new ComponentArguments.Enum([
|
||||
"accent",
|
||||
"accent2",
|
||||
"text-bg",
|
||||
]).setDefaultValue("accent"),
|
||||
})
|
||||
),
|
||||
} as const;
|
||||
@ -50,7 +58,7 @@ export class DynamicGridV2 extends Component<typeof component_arguments> {
|
||||
) {
|
||||
return (
|
||||
<a
|
||||
href={[tile.url]}
|
||||
href={tile.url || false}
|
||||
class={["tile", tile.shape]}
|
||||
style={[
|
||||
`--tile-bg-color: var(--color-brand-${tile.background})`,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user