1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-04-25 05:21:30 +00:00
bramw_baserow/web-frontend/modules/builder/mixins/headingElement.js

20 lines
562 B
JavaScript

import { resolveColor } from '@baserow/modules/core/utils/colors'
import { themeToColorVariables } from '@baserow/modules/builder/utils/theme'
export default {
computed: {
headingColorVariables() {
const level = this.values?.level || this.element.level
const variables = themeToColorVariables(this.builder.theme)
variables.unshift({
name: `H${level} default`,
value: 'default',
color: this.builder.theme[`heading_${level}_color`],
})
return variables
},
},
methods: {
resolveColor,
},
}