You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .storybook/stories/GetStarted.stories.mdx
+72Lines changed: 72 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,78 @@ new Vue({
81
81
});
82
82
```
83
83
84
+
### **Styles**
85
+
86
+
Polaris Vue supports both **CSS** & **SCSS**, you can find the neccessary styles files in `node_modules/@qikify/polaris-vue/dist/`.
87
+
88
+
#### **SCSS**
89
+
90
+
To use scss, you can import the `main.scss` file in your `.vue` or `.scss` file.
91
+
92
+
Or you can import separated scss files from dist to your project scss file.
93
+
94
+
Example:
95
+
96
+
```javascript
97
+
<style lang="scss">
98
+
@import'@qikify/polaris-vue/dist/scss/main.scss';
99
+
</style>
100
+
```
101
+
102
+
#### **CSS**
103
+
104
+
Similar with SCSS, you can import the `main.css` file in your `.vue` file. Or use it as standalone css file.
105
+
106
+
```javascript
107
+
<style>
108
+
@import'@qikify/polaris-vue/dist/css/main.css';
109
+
</style>
110
+
```
111
+
112
+
<br/>
113
+
114
+
## Aliasing Vue import
115
+
116
+
`PolarisVue` and `PortalVue` require access to the global Vue reference (via `import Vue from 'vue'`).
117
+
118
+
<fontcolor="#0c5460">If you are using a specific build of Vue (i.e. runtime-only vs. compiler + runtime), you will need to set up an alias to `vue` in your bundler config to ensure that your project, **PolarisVue** and **PortalVue** are all using the same build version of Vue. If you are seeing an error such as <fontcolor="red">"$attr and $listeners is readonly"</font>, or <fontcolor="red">"Multiple instances of Vue detected"</font>, then you will need to set up an alias.</font>
119
+
120
+
<br/>
121
+
122
+
Example: Vue alias for `Vue CLI` in `vue.config.js`
123
+
124
+
```js
125
+
module.exports= {
126
+
// ...
127
+
resolve: {
128
+
alias: {
129
+
// If using the runtime only build
130
+
vue$:'vue/dist/vue.runtime.esm.js'// 'vue/dist/vue.runtime.common.js' for webpack 1
131
+
// Or if using full build of Vue (runtime + compiler)
132
+
// vue$: 'vue/dist/vue.esm.js' // 'vue/dist/vue.common.js' for webpack 1
0 commit comments