forked from epicmaxco/vuestic-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: tweak color theme related things and do docs for color plugin
- Loading branch information
Showing
17 changed files
with
151 additions
and
123 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
2 changes: 1 addition & 1 deletion
2
src/components/statistics/progress-bars/Widgets/ColorfulBars.vue
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
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,21 @@ | ||
# ColorThemePlugin | ||
|
||
This plugin provides app-wide colors. | ||
|
||
You can define your own colors or change existing ones by providing them via plugin options: | ||
|
||
```js | ||
Vue.use(ColorThemePlugin, {themes: {primary: '#f06595', blurple: '#7289DA'}}) | ||
``` | ||
|
||
And you can use them in component code or template like this: | ||
|
||
**Component** | ||
```js | ||
this.$themes.primary | ||
``` | ||
|
||
**Template** | ||
```html | ||
<div :style="{backgroundColor: $themes.blurple}"/> | ||
``` |
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,27 @@ | ||
const getDefaultOptions = () => ({ | ||
themes: { | ||
primary: '#40e583', | ||
success: '#40e583', | ||
info: '#2c82e0', | ||
danger: '#e34b4a', | ||
warning: '#ffc202', | ||
gray: '#babfc2', | ||
dark: '#34495e', | ||
}, | ||
}) | ||
|
||
export const ColorThemePlugin = { | ||
install (Vue, options) { | ||
const defaultOptions = getDefaultOptions() | ||
|
||
if (options && options.themes) { | ||
Object.assign(defaultOptions.themes, options.themes) | ||
} | ||
|
||
Vue.prototype.$themes = defaultOptions.themes | ||
|
||
/* eslint-disable no-new */ | ||
// This line is just to make themes reactive | ||
new Vue({ data: { themes: Vue.prototype.$themes } }) | ||
}, | ||
} |
This file was deleted.
Oops, something went wrong.
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
46 changes: 29 additions & 17 deletions
46
src/vuestic-theme/vuestic-components/va-color-picker/VaColorPickerInput.demo.vue
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
10 changes: 5 additions & 5 deletions
10
...s/va-color-picker/VaPalletCustom.demo.vue → .../va-color-picker/VaPaletteCustom.demo.vue
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
Oops, something went wrong.