Add bold and code cell renderers

This commit is contained in:
Rory Powell 2021-12-21 14:08:09 -05:00
parent e6d8b81ac4
commit 2af1a6e116
4 changed files with 26 additions and 2 deletions

View File

@ -0,0 +1,11 @@
<script>
export let value
</script>
<div class="bold">{value}</div>
<style>
.bold {
font-weight: bold;
}
</style>

View File

@ -0,0 +1,5 @@
<script>
export let value
</script>
<code>{value}</code>

View File

@ -61,6 +61,10 @@ export { default as ColorPicker } from "./ColorPicker/ColorPicker.svelte"
export { default as InlineAlert } from "./InlineAlert/InlineAlert.svelte"
export { default as Banner } from "./Banner/Banner.svelte"
// Renderers
export { default as BoldRenderer } from "./Table/BoldRenderer.svelte"
export { default as CodeRenderer } from "./Table/CodeRenderer.svelte"
// Typography
export { default as Body } from "./Typography/Body.svelte"
export { default as Heading } from "./Typography/Heading.svelte"

View File

@ -1,5 +1,5 @@
<script>
import { Body, Table } from "@budibase/bbui"
import { Body, Table, BoldRenderer, CodeRenderer } from "@budibase/bbui"
import { queries as queriesStore } from "stores/backend"
import { goto } from "@roxi/routify"
@ -12,8 +12,8 @@
const dynamicVariableSchema = {
name: "",
value: "",
query: "",
value: "",
}
const onClick = dynamicVariable => {
@ -43,5 +43,9 @@
allowEditColumns={false}
allowEditRows={false}
allowSelectRows={false}
customRenderers={[
{ column: "name", component: BoldRenderer },
{ column: "value", component: CodeRenderer },
]}
/>
<Body size="S" />