UNPKG

quasar

Version:

Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time

32 lines (24 loc) 806 B
import { h, computed, getCurrentInstance } from 'vue' import useDark, { useDarkProps } from '../../composables/private/use-dark.js' import { createComponent } from '../../utils/private/create.js' import { hSlot } from '../../utils/private/render.js' export default createComponent({ name: 'QBar', props: { ...useDarkProps, dense: Boolean }, setup (props, { slots }) { const { proxy: { $q } } = getCurrentInstance() const isDark = useDark(props, $q) const classes = computed(() => 'q-bar row no-wrap items-center' + ` q-bar--${ props.dense === true ? 'dense' : 'standard' } ` + ` q-bar--${ isDark.value === true ? 'dark' : 'light' }` ) return () => h('div', { class: classes.value, role: 'toolbar' }, hSlot(slots.default)) } })