Skip to content

Commit

Permalink
fix: export twmProvider in Vue types
Browse files Browse the repository at this point in the history
  • Loading branch information
nolimits4web committed Oct 15, 2021
1 parent 274eb23 commit aab5588
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion scripts/build-vue-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ module.exports = async (outputDir = 'package') => {
)
.join('\n');
const exportComponents = `export { ${components
.map((componentName) => `twm${componentName}`)
.map(
(componentName) =>
`twm${componentName}, twm${componentName} as ${componentName}`
)
.join(', ')} }`;
typesContent = typesContent
.replace('// IMPORT_COMPONENTS', importComponents)
Expand Down
4 changes: 2 additions & 2 deletions src/vue/tailwind-mobile-vue.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Ref, ComponentOptionsMixin, DefineComponent } from 'vue';
// IMPORT_COMPONENTS

// PROVIDER
declare const TailwindMobileProvider: DefineComponent<
declare const twmProvider: DefineComponent<
{
/**
* App theme. If set to `'parent'` it will look for `ios` or `md` class on root `<html>` element, useful to use with parent framework like Framework7 or Ionic
Expand Down Expand Up @@ -45,4 +45,4 @@ declare const TailwindMobileProvider: DefineComponent<
declare const useTheme: () => Ref<'material' | 'ios'>;

// EXPORT_COMPONENTS
export { useTheme, TailwindMobileProvider };
export { useTheme, twmProvider, twmProvider as Provider };

0 comments on commit aab5588

Please sign in to comment.