Update autoscreens and default layouts to use new component props

This commit is contained in:
Andrew Kingston 2021-06-28 10:47:23 +01:00
parent 829c2bb8ee
commit 2333754862
3 changed files with 20 additions and 9 deletions

View File

@ -54,6 +54,10 @@ function generateTitleContainer(table) {
.type("h2") .type("h2")
.instanceName("Title") .instanceName("Title")
.text(table.name) .text(table.name)
.customProps({
size: "M",
align: "left",
})
return new Component("@budibase/standard-components/container") return new Component("@budibase/standard-components/container")
.normalStyle({ .normalStyle({

View File

@ -25,11 +25,8 @@ export function makeLinkComponent(tableName) {
.customProps({ .customProps({
url: `/${tableName.toLowerCase()}`, url: `/${tableName.toLowerCase()}`,
openInNewTab: false, openInNewTab: false,
color: "", size: "S",
hoverColor: "", align: "left",
underline: false,
fontSize: "",
fontFamily: "initial",
}) })
} }
@ -62,6 +59,10 @@ export function makeBreadcrumbContainer(tableName, text, capitalise = false) {
.customStyle(spectrumColor(700)) .customStyle(spectrumColor(700))
.text(">") .text(">")
.instanceName("Arrow") .instanceName("Arrow")
.customProps({
size: "S",
align: "left",
})
const textStyling = { const textStyling = {
color: "#000000", color: "#000000",
@ -77,6 +78,10 @@ export function makeBreadcrumbContainer(tableName, text, capitalise = false) {
.customStyle(spectrumColor(700)) .customStyle(spectrumColor(700))
.text(text) .text(text)
.instanceName("Identifier") .instanceName("Identifier")
.customProps({
size: "S",
align: "left",
})
return new Component("@budibase/standard-components/container") return new Component("@budibase/standard-components/container")
.normalStyle({ .normalStyle({
@ -148,6 +153,10 @@ export function makeTitleContainer(title) {
.type("h2") .type("h2")
.instanceName("Title") .instanceName("Title")
.text(title) .text(title)
.customProps({
size: "M",
align: "left",
})
return new Component("@budibase/standard-components/container") return new Component("@budibase/standard-components/container")
.normalStyle({ .normalStyle({

View File

@ -20,15 +20,13 @@ exports.createHomeScreen = () => ({
_id: "ef60083f-4a02-4df3-80f3-a0d3d16847e7", _id: "ef60083f-4a02-4df3-80f3-a0d3d16847e7",
_component: "@budibase/standard-components/heading", _component: "@budibase/standard-components/heading",
_styles: { _styles: {
normal: {
"text-align": "left",
},
hover: {}, hover: {},
active: {}, active: {},
selected: {}, selected: {},
}, },
text: "Welcome to your Budibase App 👋", text: "Welcome to your Budibase App 👋",
type: "h2", size: "M",
align: "left",
_instanceName: "Heading", _instanceName: "Heading",
_children: [], _children: [],
}, },