@croud-ui/vue-3-components
A selection of components and associated composables built with the Vue 3 composition API.
Components
- CuiDataTable
- CuiDataTableCard
- CuiDataTableCell
- CuiDataTableRow
Composables
- usePagination
- useFetchList
- useBreakpoints
Install
To use these components in your vue app, install the component via the npm registery:
npm install @croud-ui/vue-3-components
Usage
Components
Import the component into the .vue file where you want to render it.
<script lang='ts' setup>
import { CuiDataTableCard } from "@croud-ui/vue-3-components";
</script>
<template>
<CuiDataTableCard
:headers="tableHeaders"
heading="Current tasks"
:fetch="fetchCurrentTasks"
:filters="searchParams"
:filtersMissing="filtersMissing"
:fetchOptions="fetchOptions"
/>
</template>
Composables
Import the composable into the .vue file where you want to use it.
<script lang='ts' setup>
import { useFetchList } from "@croud-ui/vue-3-components";
const { results, loading } = useFetchList(
() => fetchResource(),
{},
{ skip: computed(() => shouldSkipRef) }
);
</script>
License
Licensed under the MIT License