@data-fair/lib-common-types 1.19.1 → 1.19.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/theme/index.js +11 -4
package/package.json
CHANGED
package/theme/index.js
CHANGED
|
@@ -144,12 +144,19 @@ export const defaultTheme = {
|
|
|
144
144
|
};
|
|
145
145
|
export const getTextColorsCss = (colors, theme) => {
|
|
146
146
|
let css = '';
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
// by default give the text-primary color to links
|
|
148
|
+
if (colors['text-primary']) {
|
|
149
|
+
css += `
|
|
150
|
+
.v-theme--${theme} a { color: ${colors['text-primary']} }`;
|
|
151
|
+
}
|
|
152
|
+
for (const color of ['surface-inverse', 'primary', 'secondary', 'accent', 'error', 'info', 'success', 'warning', 'admin']) {
|
|
153
|
+
// create a text-color class to apply text-* color variants
|
|
154
|
+
const textKey = `text-${color}`;
|
|
155
|
+
if (colors[textKey]) {
|
|
150
156
|
css += `
|
|
151
|
-
.v-theme--${theme} .text-${color}:not(.v-btn--disabled) { color: ${colors[
|
|
157
|
+
.v-theme--${theme} .text-${color}:not(.v-btn--disabled) { color: ${colors[textKey]}!important; }`;
|
|
152
158
|
}
|
|
159
|
+
// apply the on-* color variants to links (they are ignored by vuetify by default)
|
|
153
160
|
const onKey = `on-${color}`;
|
|
154
161
|
if (colors[onKey]) {
|
|
155
162
|
css += `
|