add missing data type links, add missing state

This commit is contained in:
Gerard Burns 2024-05-13 13:44:54 +01:00
parent 53553d8dd6
commit 914beb890f
3 changed files with 39 additions and 5 deletions

View File

@ -47,7 +47,6 @@
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
let button let button
let popover
let component let component
$: sortedOptions = getSortedOptions(options, getOptionLabel, sort) $: sortedOptions = getSortedOptions(options, getOptionLabel, sort)
@ -153,7 +152,6 @@
<Popover <Popover
anchor={customAnchor ? customAnchor : button} anchor={customAnchor ? customAnchor : button}
align={align || "left"} align={align || "left"}
bind:this={popover}
{open} {open}
on:close={() => (open = false)} on:close={() => (open = false)}
useAnchorWidth={!autoWidth} useAnchorWidth={!autoWidth}

View File

@ -36,9 +36,34 @@
if (columnType === "User") { if (columnType === "User") {
return "https://docs.budibase.com/docs/user" return "https://docs.budibase.com/docs/user"
} }
if (columnType === "QR") {
return "https://docs.budibase.com/docs/barcodeqr"
}
if (columnType === "Relationship") {
return "https://docs.budibase.com/docs/relationships"
}
if (columnType === "Formula") {
return "https://docs.budibase.com/docs/formula"
}
if (columnType === "Options") {
return "https://docs.budibase.com/docs/options"
}
if (columnType === "BigInt") {
// No BigInt docs
return null
}
if (columnType === "Boolean") {
return "https://docs.budibase.com/docs/boolean-truefalse"
}
if (columnType === "Signature") {
// No Signature docs
return null
}
return "" return null
} }
$: docLink = getDocLink(columnType);
</script> </script>
<Line noWrap> <Line noWrap>
@ -50,7 +75,8 @@
/> />
<Text value=" is a " /> <Text value=" is a " />
<DocumentationLink <DocumentationLink
href={getDocLink(columnType)} disabled={docLink === null}
href={docLink}
icon={columnIcon} icon={columnIcon}
text={`${columnType} column`} text={`${columnType} column`}
/> />

View File

@ -4,9 +4,10 @@
export let icon export let icon
export let text export let text
export let href export let href
export let disabled = false
</script> </script>
<a tabindex="0" {href} rel="noopener noreferrer" target="_blank" class="link"> <a class:disabled tabindex="0" {href} rel="noopener noreferrer" target="_blank" class="link">
<Icon size="XS" name={icon} /> <Icon size="XS" name={icon} />
<span class="text"> <span class="text">
<slot> <slot>
@ -42,8 +43,17 @@
filter: brightness(120%); filter: brightness(120%);
} }
.disabled {
filter: brightness(100%);
border-bottom: 1px solid var(--grey-6);
}
.link :global(svg) { .link :global(svg) {
margin-right: 3px; margin-right: 3px;
color: var(--blue); color: var(--blue);
} }
.disabled :global(svg){
color: var(--grey-6);
}
</style> </style>