style: added BaseTabs and BaseTab functional components for unified tab displaying; workflow: added .js files check when purging in prod

This commit is contained in:
Roberto Tonino
2020-11-19 18:34:51 +01:00
parent ced8650ee6
commit 5c1e5204b2
7 changed files with 82 additions and 51 deletions

View File

@@ -0,0 +1,33 @@
import { defineComponent } from '@vue/composition-api'
// https://vuejs.org/v2/guide/render-function.html
// https://vuejs.org/v2/guide/render-function.html#createElement-Arguments
export const BaseTab = defineComponent({
name: 'BaseTab',
functional: true,
render(h, ctx) {
return h(
'li',
{
class: [ctx.data.class, 'section-tabs__tab', 'uppercase-first-letter'],
on: ctx.data.on
},
ctx.slots().default
)
}
})
export const BaseTabs = defineComponent({
name: 'BaseTabs',
functional: true,
render(h, ctx) {
return h(
'ul',
{
class: [ctx.data.class, 'my-8', 'section-tabs'],
on: ctx.data.on
},
ctx.slots().default
)
}
})