Skip to content

Commit 09a4d8f

Browse files
committed
feat: export the scss for custom style
1 parent ba35c02 commit 09a4d8f

File tree

8 files changed

+168
-89
lines changed

8 files changed

+168
-89
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ node_modules
1010
/locale
1111

1212
/index.*
13+
14+
/scss

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,19 @@ $ npm install vue2-datepicker --save
5757
</template>
5858
```
5959

60+
## Theme
61+
62+
If your project uses SCSS, you can change the default style variables.
63+
64+
To create a scss file. e.g. `datepicker.scss`:
65+
66+
```scss
67+
$default-color: #555;
68+
$primary-color: #1284e7;
69+
70+
@import '~vue2-datepicker/scss/index.scss';
71+
```
72+
6073
## Internationalization
6174

6275
The default language of v3.x is English. If you need other locales.

README.zh-CN.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,20 @@
2929
$ npm install vue2-datepicker --save
3030
```
3131

32-
## Usage
32+
## 主题
33+
34+
如果你的项目使用了 SCSS, 你可以改变默认的变量.
35+
36+
创建一个新的文件. e.g. `datepicker.scss`:
37+
38+
```scss
39+
$default-color: #555;
40+
$primary-color: #1284e7;
41+
42+
@import '~vue2-datepicker/scss/index.scss';
43+
```
44+
45+
## 用法
3346

3447
```html
3548
<script>

package-lock.json

Lines changed: 72 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)