' +
'')
})
@@ -85,6 +88,14 @@ window.copyCSS = function (id) {
document.execCommand('copy')
}
+window.copyJS = function (id, jsx) {
+ var copy = document.getElementById('docs-copy')
+ var js = id.replace(/-+./g, (m) => m.slice(-1).toUpperCase())
+ copy.value = jsx ? js.replace(/./, (m) => m.toUpperCase()) : js
+ copy.select()
+ document.execCommand('copy')
+}
+
window.savePDF = function (el, options, pdf) {
if (typeof el === 'string') {
var svg = document.getElementById(el)
diff --git a/lib/readme.md b/lib/readme.md
index 61586afb..2226db5f 100644
--- a/lib/readme.md
+++ b/lib/readme.md
@@ -43,22 +43,12 @@ Scale the icons/logos by using font sizes divisible with `10` for sharpest rende
Note: correct width/height in `em` for each icon is automatically provided by `@nrk/core-icons`
-## Color
-
-Setting SVGs to inherit `currentColor` (the text color) helps you ensure sufficient contrast between background and foreground. This is automatically done if you are using [Core CSS](https://static.nrk.no/core-css/latest/), but can also be achieved by setting `svg { fill: currentColor }`
-
-✅ Do | 🚫 Don't
-:-- | :--
-`svg { fill: currentColor }` | `svg { fill: red }`
-
-
## Icons