UNPKG

phosphor-solid

Version:

A clean and friendly icon family for Solid-js

51 lines (50 loc) 3.68 kB
/* GENERATED FILE */ import { useContext } from "solid-js"; import { IconContext } from "../lib"; const renderPathFor = (weight, color) => { switch (weight) { case "bold": return (<> <path d="M152,80H111.83477L104,128.20232a27.99935,27.99935,0,1,1,0,39.5969" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/> <rect x="40" y="40" width="176" height="176" rx="8" stroke-width="24" stroke={color} stroke-linecap="round" stroke-linejoin="round" fill="none"/> </>); case "duotone": return (<> <rect x="40" y="40" width="176" height="176" rx="8" opacity="0.2"/> <path d="M152,80H111.83477L104,128.20232a27.99935,27.99935,0,1,1,0,39.5969" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <rect x="40" y="40" width="176" height="176" rx="8" stroke-width="16" stroke={color} stroke-linecap="round" stroke-linejoin="round" fill="none"/> </>); case "fill": return (<> <path d="M208,32H48A16.01833,16.01833,0,0,0,32,48V208a16.01833,16.01833,0,0,0,16,16H208a16.01833,16.01833,0,0,0,16-16V48A16.01833,16.01833,0,0,0,208,32ZM123.88184,112.002A35.99912,35.99912,0,1,1,98.35449,173.4668a7.99985,7.99985,0,1,1,11.291-11.33594,20.20173,20.20173,0,0,0,28.47461-.001,19.91646,19.91646,0,0,0-.001-28.25976,20.20412,20.20412,0,0,0-28.47461.001,7.99971,7.99971,0,0,1-13.541-6.95214l7.835-48.20215A8.00076,8.00076,0,0,1,111.835,72H152a8,8,0,0,1,0,16H118.63965L114.542,113.21094A36.413,36.413,0,0,1,123.88184,112.002Z"/> </>); case "light": return (<> <path d="M152,80H111.83477L104,128.20232a27.99935,27.99935,0,1,1,0,39.5969" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="12"/> <rect x="40" y="40" width="176" height="176" rx="8" stroke-width="12" stroke={color} stroke-linecap="round" stroke-linejoin="round" fill="none"/> </>); case "thin": return (<> <path d="M152,80H111.83477L104,128.20232a27.99935,27.99935,0,1,1,0,39.5969" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/> <rect x="40" y="40" width="176" height="176" rx="8" stroke-width="8" stroke={color} stroke-linecap="round" stroke-linejoin="round" fill="none"/> </>); case "regular": return (<> <path d="M152,80H111.83477L104,128.20232a27.99935,27.99935,0,1,1,0,39.5969" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <rect x="40" y="40" width="176" height="176" rx="8" stroke-width="16" stroke={color} stroke-linecap="round" stroke-linejoin="round" fill="none"/> </>); default: console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'); return null; } }; const NumberSquareFive = (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 NumberSquareFive;