fix: prevent unnecessary themeColor deprecation notice (#2403)

This commit is contained in:
John Hildenbiddle 2024-04-12 23:17:45 -05:00 committed by GitHub
parent 87fd55d712
commit a3ab2be0b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -47,17 +47,19 @@ export default function (vm) {
return this.__themeColor;
},
set themeColor(value) {
this.__themeColor = value;
console.warn(
stripIndent(/* html */ `
$docsify.themeColor is deprecated. Use a --theme-color property in your style sheet. Example:
<style>
:root {
--theme-color: deeppink;
}
</style>
`).trim()
);
if (value) {
this.__themeColor = value;
console.warn(
stripIndent(`
$docsify.themeColor is deprecated. Use a --theme-color property in your style sheet. Example:
<style>
:root {
--theme-color: deeppink;
}
</style>
`).trim()
);
}
},
},