UNPKG

phosphor-solid

Version:

A clean and friendly icon family for Solid-js

84 lines (83 loc) 8.54 kB
/* GENERATED FILE */ import { useContext } from "solid-js"; import { IconContext } from "../lib"; const renderPathFor = (weight, color) => { switch (weight) { case "bold": return (<> <line x1="224" y1="136" x2="224" y2="116" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/> <line x1="224" y1="136" x2="204.97887" y2="129.81966" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/> <line x1="224" y1="136" x2="212.24429" y2="152.18034" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/> <line x1="224" y1="136" x2="235.75571" y2="152.18034" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/> <line x1="224" y1="136" x2="243.02113" y2="129.81966" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/> <circle cx="108" cy="100" r="60" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/> <path d="M22.208,199.99785a112.00725,112.00725,0,0,1,171.58459.00066" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/> </>); case "duotone": return (<> <circle cx="108" cy="100" r="60" opacity="0.2"/> <circle cx="108" cy="100" r="60" fill="none" stroke={color} stroke-miterlimit="10" stroke-width="16"/> <path d="M22.208,199.99785a112.00725,112.00725,0,0,1,171.58459.00066" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <circle cx="220" cy="136" r="16" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <line x1="220" y1="120" x2="220" y2="108" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <line x1="206.14359" y1="128" x2="195.75129" y2="122" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <line x1="206.14359" y1="144" x2="195.75129" y2="150" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <line x1="220" y1="152" x2="220" y2="164" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <line x1="233.85641" y1="144" x2="244.24871" y2="150" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <line x1="233.85641" y1="128" x2="244.24871" y2="122" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> </>); case "fill": return (<> <path d="M199.91748,194.85156a8.00007,8.00007,0,0,1-6.125,13.14649H22.208a8.00007,8.00007,0,0,1-6.125-13.14649,119.8892,119.8892,0,0,1,55.77441-37.29339,68,68,0,1,1,72.28516,0A119.89061,119.89061,0,0,1,199.91748,194.85156ZM251.17676,154a7.99606,7.99606,0,0,1-10.92822,2.92822l-4.66822-2.69519A23.999,23.999,0,0,1,228,158.6239V164a8,8,0,0,1-16,0v-5.3761a23.999,23.999,0,0,1-7.58032-4.39087l-4.66822,2.69519a8,8,0,0,1-8-13.85644l4.65674-2.68866a23.73636,23.73636,0,0,1,0-8.76624l-4.65674-2.68866a8,8,0,1,1,8-13.85644l4.66822,2.69519A23.999,23.999,0,0,1,212,113.3761V108a8,8,0,0,1,16,0v5.3761a23.999,23.999,0,0,1,7.58032,4.39087l4.66822-2.69519a8,8,0,1,1,8,13.85644l-4.65674,2.68866a23.73636,23.73636,0,0,1,0,8.76624l4.65674,2.68866A8.00032,8.00032,0,0,1,251.17676,154ZM220,144a8,8,0,1,0-8-8A8.00917,8.00917,0,0,0,220,144Z"/> </>); case "light": return (<> <circle cx="108" cy="100" r="60" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="12"/> <path d="M22.208,199.99785a112.00725,112.00725,0,0,1,171.58459.00066" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="12"/> <circle cx="220" cy="136" r="16" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="12"/> <line x1="220" y1="120" x2="220" y2="108" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="12"/> <line x1="206.14359" y1="128" x2="195.75129" y2="122" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="12"/> <line x1="206.14359" y1="144" x2="195.75129" y2="150" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="12"/> <line x1="220" y1="152" x2="220" y2="164" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="12"/> <line x1="233.85641" y1="144" x2="244.24871" y2="150" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="12"/> <line x1="233.85641" y1="128" x2="244.24871" y2="122" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="12"/> </>); case "thin": return (<> <circle cx="108" cy="100" r="60" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/> <path d="M22.208,199.99785a112.00725,112.00725,0,0,1,171.58459.00066" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/> <circle cx="220" cy="136" r="16" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/> <line x1="220" y1="120" x2="220" y2="108" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/> <line x1="206.14359" y1="128" x2="195.75129" y2="122" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/> <line x1="206.14359" y1="144" x2="195.75129" y2="150" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/> <line x1="220" y1="152" x2="220" y2="164" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/> <line x1="233.85641" y1="144" x2="244.24871" y2="150" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/> <line x1="233.85641" y1="128" x2="244.24871" y2="122" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/> </>); case "regular": return (<> <circle cx="108" cy="100" r="60" fill="none" stroke={color} stroke-miterlimit="10" stroke-width="16"/> <path d="M22.208,199.99785a112.00725,112.00725,0,0,1,171.58459.00066" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <circle cx="220" cy="136" r="16" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <line x1="220" y1="120" x2="220" y2="108" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <line x1="206.14359" y1="128" x2="195.75129" y2="122" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <line x1="206.14359" y1="144" x2="195.75129" y2="150" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <line x1="220" y1="152" x2="220" y2="164" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <line x1="233.85641" y1="144" x2="244.24871" y2="150" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <line x1="233.85641" y1="128" x2="244.24871" y2="122" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> </>); default: console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'); return null; } }; const UserGear = (props, ref) => { const { color, size, weight, mirrored, children, ...restProps } = props; const { color: contextColor, size: contextSize, weight: contextWeight, mirrored: contextMirrored, ...restContext } = useContext(IconContext); return (<svg ref={ref} xmlns="http://www.w3.org/2000/svg" width={size ?? contextSize} height={size ?? contextSize} fill={color ?? contextColor} viewBox="0 0 256 256" transform={mirrored || contextMirrored ? "scale(-1, 1)" : undefined} {...restContext} {...restProps}> {children} <rect width="256" height="256" fill="none"/> {renderPathFor(weight ?? contextWeight, color ?? contextColor)} </svg>); }; export default UserGear;