+
- import { watch, ref, provide } from '@vue/composition-api';
+ import { watch, ref, provide, toRefs } from '@vue/composition-api';
import { LAYOUT_1_1_1, LAYOUT_1_2_2, LAYOUT_1_2_3 } from './gridBaseLayouts';
import useGridLayout from './useGridLayout';
- import useGridLoading from './useGridLoading';
- import SkeletonCard from './SkeletonCard';
-
+ /* import useGridLoading from './useGridLoading'; */
+ /* import SkeletonCard from './SkeletonCard';
+ */
/**
* Displays a grid of cards `KCard`.
*/
export default {
name: 'KCardGrid',
- components: {
- SkeletonCard,
- },
+ /* components: {
+ SkeletonCard,
+ }, */
setup(props) {
- const { currentBreakpointConfig, windowBreakpoint } = useGridLayout(props);
- const {
- showGrid,
- isLoading,
- skeletonCount,
- skeletonHeight,
- skeletonOrientation,
- skeletonThumbnailDisplay,
- skeletonThumbnailAlign,
- } = useGridLoading(props);
+ const { layout, layoutOverride } = toRefs(props);
+ const { currentBreakpointConfig, windowBreakpoint } = useGridLayout(layout, layoutOverride);
const gridStyle = ref({});
const gridItemStyle = ref({});
@@ -104,13 +73,6 @@
return {
windowBreakpoint,
gridStyle,
- isLoading,
- showGrid,
- skeletonCount,
- skeletonHeight,
- skeletonOrientation,
- skeletonThumbnailDisplay,
- skeletonThumbnailAlign,
};
},
props: {
@@ -138,26 +100,6 @@
default: null,
},
// eslint-enable-next-line kolibri/vue-no-unused-properties
- /**
- * Set to `true` as long as data for cards
- * are being loaded to display loading skeletons
- */
- // eslint-disable-next-line kolibri/vue-no-unused-properties
- loading: {
- type: Boolean,
- default: false,
- },
- // eslint-enable-next-line kolibri/vue-no-unused-properties
- /**
- * Configures loading skeletons
- */
- // eslint-disable-next-line kolibri/vue-no-unused-properties
- skeletonsConfig: {
- type: Array,
- required: false,
- default: null,
- },
- // eslint-enable kolibri/vue-no-unused-properties
/**
* Use for development only. Shows information in
* the grid's corner that is useful for configuring
@@ -176,24 +118,6 @@