-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.js
14 lines (11 loc) · 806 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var icons = require('./lib/icons.json');
module.exports = function (network, opts) {
var data = icons[network];
var opts = opts || {},
svgClass = opts.svgClass || 'social-svg',
backgroundClass = opts.backgroundClass || 'social-svg-background',
iconClass = opts.iconClass || 'social-svg-icon',
maskClass = opts.maskClass || 'social-svg-mask',
color = opts.color || data.color;
return '<svg class="' + svgClass + '" viewBox="0 0 64 64" ><g class="' + backgroundClass + '" ><circle cx="32" cy="32" r="31" ></circle></g><g class="' + iconClass + '" ><path d="' + data.icon + '" ></path></g><g class="' + maskClass + '" style="fill:' + color + '" ><path d="' + data.mask +'" ></path></g></svg>';
};