Skip to content

Commit fba5132

Browse files
Moving things around and update types
1 parent 60b8343 commit fba5132

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

src/plugin/index.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
2-
import { App } from 'vue';
1+
import type { App } from 'vue';
2+
import type { GlobalOptions } from './types';
33
import './styles/main.scss';
4-
import type { Props } from './types';
54
import VDrilldownTable from './VDrilldownTable.vue';
65

76

87
export const globalOptions = Symbol();
98

10-
export function createVDrilldownTable(options: Partial<Props> = {}) {
9+
export function createVDrilldownTable(options: GlobalOptions = {}) {
1110
const install = (app: App) => {
1211
app.provide(globalOptions, options);
1312

src/plugin/types/index.ts

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import type {
1313
VSkeletonLoader,
1414
} from 'vuetify/components';
1515

16+
export * from '../index';
17+
1618

1719
// -------------------------------------------------- Vuetify Types //
1820
export type Density = 'default' | 'comfortable' | 'compact';
@@ -181,8 +183,6 @@ export interface Props {
181183
headerColor?: string | undefined;
182184
headers?: VDataTable['$props']['headers'];
183185
height?: string | number | undefined;
184-
// hideDefaultFooter?: boolean; // ? Custom Property - Need to add/test
185-
// hideDefaultHeader?: boolean; // ? Custom Property - Need to add/test
186186
hideNoData?: VDataTable['$props']['hideNoData'];
187187
hover?: VDataTable['$props']['hover'];
188188
isDrilldown?: boolean;
@@ -230,6 +230,23 @@ export interface Props {
230230

231231
export type Drilldown = Props;
232232

233+
export interface GlobalOptions extends Pick<Props,
234+
'colorPercentageChange' |
235+
'colorPercentageDirection' |
236+
'footerBackgroundColor' |
237+
'footerColor' |
238+
'headerBackgroundColor' |
239+
'headerColor' |
240+
'loaderProps' |
241+
'loaderType' |
242+
'density' |
243+
'elevation' |
244+
'hover' |
245+
'itemsPerPageOptions' |
246+
'separator' |
247+
'sortAscIcon'
248+
> { };
249+
233250

234251
// -------------------------------------------------- Slots //
235252
type GetSortIcon = (column: InternalDataTableHeader) => IconValue;

0 commit comments

Comments
 (0)