phosphor-solid
Version:
A clean and friendly icon family for Solid-js
92 lines (67 loc) • 4.02 kB
JavaScript
import { useContext } from 'solid-js';
import { IconContext } from '../lib/index.esm.js';
import { template, setAttribute, spread, insert } from 'solid-js/web';
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../_virtual/_rollupPluginBabelHelpers.js';
const _tmpl$ = template(`<svg><circle cx="128" cy="200" r="16"></circle></svg>`, 4, true),
_tmpl$2 = template(`<svg><path d="M20.20827,75.93119c63.485-47.90816,152.09866-47.90813,215.58361.00009a8.06594,8.06594,0,0,1,1.208,11.6015c-19.03707,22.43714-82.95213,97.76737-102.95962,121.34817a7.87135,7.87135,0,0,1-12.08054,0C101.9523,185.30027,38.03757,109.97061,19.00019,87.53317A8.06626,8.06626,0,0,1,20.20827,75.93119Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$3 = template(`<svg><path d="M128,219.70508a15.90814,15.90814,0,0,1-12.14014-5.64844L12.8999,92.709a16.182,16.182,0,0,1-3.71826-12.206,15.97026,15.97026,0,0,1,6.208-10.95752c66.30371-50.03418,158.91748-50.03516,225.22119,0a15.97226,15.97226,0,0,1,6.20752,10.957A16.18377,16.18377,0,0,1,243.10059,92.708L140.14014,214.05664A15.90814,15.90814,0,0,1,128,219.70508ZM25.084,82.27441a.12788.12788,0,0,0,.01612.083l102.89844,121.2749L230.8999,82.35693a.16373.16373,0,0,0,.01074-.11767C170.36279,36.57764,85.709,36.563,25.084,82.27441Zm-.05664.04248ZM20.2085,75.93115h0Z"></path></svg>`, 4, true),
_tmpl$4 = template(`<svg><circle cx="128" cy="200" r="10"></circle></svg>`, 4, true),
_tmpl$5 = template(`<svg><circle cx="128" cy="200" r="8"></circle></svg>`, 4, true),
_tmpl$6 = template(`<svg><circle cx="128" cy="200" r="12"></circle></svg>`, 4, true),
_tmpl$7 = template(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"></rect></svg>`, 4);
var renderPathFor = function renderPathFor(weight, color) {
switch (weight) {
case "bold":
return _tmpl$.cloneNode(true);
case "duotone":
return function () {
var _el$2 = _tmpl$2.cloneNode(true);
setAttribute(_el$2, "stroke", color);
return _el$2;
}();
case "fill":
return _tmpl$3.cloneNode(true);
case "light":
return _tmpl$4.cloneNode(true);
case "thin":
return _tmpl$5.cloneNode(true);
case "regular":
return _tmpl$6.cloneNode(true);
default:
console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".');
return null;
}
};
var WifiNone = function WifiNone(props, ref) {
var color = props.color,
size = props.size,
weight = props.weight,
mirrored = props.mirrored,
children = props.children,
restProps = _objectWithoutPropertiesLoose(props, ["color", "size", "weight", "mirrored", "children"]);
var _useContext = useContext(IconContext),
contextColor = _useContext.color,
contextSize = _useContext.size,
contextWeight = _useContext.weight,
contextMirrored = _useContext.mirrored,
restContext = _objectWithoutPropertiesLoose(_useContext, ["color", "size", "weight", "mirrored"]);
return function () {
var _el$7 = _tmpl$7.cloneNode(true),
_el$8 = _el$7.firstChild;
var _ref$ = ref;
typeof _ref$ === "function" ? _ref$(_el$7) : ref = _el$7;
setAttribute(_el$7, "width", size != null ? size : contextSize);
setAttribute(_el$7, "height", size != null ? size : contextSize);
setAttribute(_el$7, "fill", color != null ? color : contextColor);
setAttribute(_el$7, "transform", mirrored || contextMirrored ? "scale(-1, 1)" : undefined);
spread(_el$7, restContext, true, true);
spread(_el$7, restProps, true, true);
insert(_el$7, children, _el$8);
insert(_el$7, function () {
return renderPathFor(weight != null ? weight : contextWeight, color != null ? color : contextColor);
}, null);
return _el$7;
}();
};
export default WifiNone;
//# sourceMappingURL=WifiNone.esm.js.map