integrate jsonschema2markdown; add support for inline markdown rendering from templates
This commit is contained in:
23
src/icons.ts
Normal file
23
src/icons.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
export const icons: Record<string, string> = Object.create(null);
|
||||
|
||||
const whitespace = /[\s\t\n]+/g;
|
||||
const feather_icons: Record<string, string> = require('../vendor/feather-icons/icons.json');
|
||||
|
||||
for (const [name, contents] of Object.entries(feather_icons)) {
|
||||
icons[name] = `
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
class="icon ${name}"
|
||||
aria-hidden="true"
|
||||
style="width: var(--icon-size, 1rem); height: var(--icon-size, 1rem)"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentcolor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>${contents}</svg>
|
||||
`.replace(whitespace, ' ').trim();
|
||||
}
|
||||
|
||||
Object.freeze(icons);
|
||||
Reference in New Issue
Block a user