-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update package version to 1.6.3 and fix style tag injection is…
…sue and update docs for vuetify
- Loading branch information
Showing
5 changed files
with
81 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
## Demo | ||
https://stackblitz.com/~/github.com/EranGrin/vuetify-web-component-wrapper | ||
|
||
## Usage | ||
|
||
1. **Install Vuetify**: | ||
```bash | ||
npm install vuetify | ||
``` | ||
or | ||
```bash | ||
yarn add vuetify | ||
``` | ||
2. **Create the vutify plugin configuration file**: | ||
```javascript | ||
// Styles | ||
import '@mdi/font/css/materialdesignicons.css' | ||
import 'vuetify/styles' | ||
// Composables | ||
import { createVuetify } from 'vuetify' | ||
export default createVuetify({ | ||
theme: { | ||
defaultTheme: 'dark', | ||
}, | ||
}) | ||
``` | ||
3. **Add the plugin to the plugins warpper**: | ||
```javascript | ||
import vuetify from './vuetify' | ||
export const pluginsWrapper = { | ||
install(GivenVue: any) { | ||
const Vue = GivenVue | ||
Vue.use(vuetify) | ||
} | ||
} | ||
``` | ||
4. **Create style.css file**: | ||
```css | ||
@import 'vuetify/dist/vuetify.min.css'; | ||
``` | ||
you can add any global css to this file | ||
5. **Import the style.css file with ?inline**:<br> | ||
```javascript | ||
import style from './style.css?inline'; | ||
``` | ||
6. **Create your web component** passing the style variable as the cssFrameworkStyles option:<br> | ||
```javascript | ||
createWebComponent({ | ||
rootComponent: App, | ||
elementName: 'my-web-component', | ||
plugins: pluginsWrapper, | ||
cssFrameworkStyles: style, | ||
VueDefineCustomElement, | ||
h, | ||
createApp, | ||
getCurrentInstance, | ||
disableStyleRemoval: false, | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters