diff options
Diffstat (limited to 'src/util/link.js')
-rw-r--r-- | src/util/link.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/util/link.js b/src/util/link.js index 107b35ff..7ed5fd8e 100644 --- a/src/util/link.js +++ b/src/util/link.js @@ -10,7 +10,14 @@ // gener8ting just a8out any link on the site. import * as html from './html.js' -import { getLinkThemeString } from './colors.js' +import { getColors } from './colors.js' + +export function getLinkThemeString(color) { + if (!color) return ''; + + const { primary, dim } = getColors(color); + return `--primary-color: ${primary}; --dim-color: ${dim}`; +} const linkHelper = (hrefFn, {color = true, attr = null} = {}) => (thing, { |