This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/vuetify/lib/components/VGrid/VContainer.js

65 lines
1.4 KiB
JavaScript
Raw Permalink Normal View History

2019-08-11 18:48:02 +00:00
import "../../../src/components/VGrid/_grid.sass";
import "../../../src/components/VGrid/VGrid.sass";
import Grid from './grid';
import mergeData from '../../util/mergeData';
/* @vue/component */
export default Grid('container').extend({
name: 'v-container',
functional: true,
props: {
id: String,
tag: {
type: String,
default: 'div'
},
fluid: {
type: Boolean,
default: false
}
},
render(h, {
props,
data,
children
}) {
let classes;
const {
attrs
} = data;
if (attrs) {
// reset attrs to extract utility clases like pa-3
data.attrs = {};
classes = Object.keys(attrs).filter(key => {
// TODO: Remove once resolved
// https://github.com/vuejs/vue/issues/7841
if (key === 'slot') return false;
const value = attrs[key]; // add back data attributes like data-test="foo" but do not
// add them as classes
if (key.startsWith('data-')) {
data.attrs[key] = value;
return false;
}
return value || typeof value === 'string';
});
}
if (props.id) {
data.domProps = data.domProps || {};
data.domProps.id = props.id;
}
return h(props.tag, mergeData(data, {
staticClass: 'container',
class: Array({
'container--fluid': props.fluid
}).concat(classes || [])
}), children);
}
});
//# sourceMappingURL=VContainer.js.map