UNPKG

phosphor-solid

Version:

A clean and friendly icon family for Solid-js

56 lines (55 loc) 4.45 kB
/* GENERATED FILE */ import { useContext } from "solid-js"; import { IconContext } from "../lib"; const renderPathFor = (weight, color) => { switch (weight) { case "bold": return (<> <path d="M45.42853,176.99811A95.95978,95.95978,0,1,1,79.00228,210.5717l.00023-.001L45.84594,220.044a8,8,0,0,1-9.89-9.89l9.47331-33.15657Z" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/> <line x1="96" y1="108" x2="160" y2="108" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/> <line x1="96" y1="148" x2="160" y2="148" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/> </>); case "duotone": return (<> <path d="M45.42853,176.99811A95.95978,95.95978,0,1,1,79.00228,210.5717l.00023-.001L45.84594,220.044a8,8,0,0,1-9.89-9.89l9.47331-33.15657Z" opacity="0.2"/> <path d="M45.42853,176.99811A95.95978,95.95978,0,1,1,79.00228,210.5717l.00023-.001L45.84594,220.044a8,8,0,0,1-9.89-9.89l9.47331-33.15657Z" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <line x1="96" y1="112" x2="160" y2="112" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <line x1="96" y1="144" x2="160" y2="144" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> </>); case "fill": return (<> <path d="M128.00146,23.99316A104.03063,104.03063,0,0,0,36.814,178.04l-8.55468,29.90625a15.995,15.995,0,0,0,19.78125,19.78125l29.91406-8.53125A104.01366,104.01366,0,1,0,128.00146,23.99316Zm32,128h-64a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32h-64a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"/> </>); case "light": return (<> <path d="M45.42853,176.99811A95.95978,95.95978,0,1,1,79.00228,210.5717l.00023-.001L45.84594,220.044a8,8,0,0,1-9.89-9.89l9.47331-33.15657Z" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="12"/> <line x1="96" y1="112" x2="160" y2="112" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="12"/> <line x1="96" y1="144" x2="160" y2="144" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="12"/> </>); case "thin": return (<> <path d="M45.42853,176.99811A95.95978,95.95978,0,1,1,79.00228,210.5717l.00023-.001L45.84594,220.044a8,8,0,0,1-9.89-9.89l9.47331-33.15657Z" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/> <line x1="96" y1="112" x2="160" y2="112" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/> <line x1="96" y1="144" x2="160" y2="144" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/> </>); case "regular": return (<> <path d="M45.42853,176.99811A95.95978,95.95978,0,1,1,79.00228,210.5717l.00023-.001L45.84594,220.044a8,8,0,0,1-9.89-9.89l9.47331-33.15657Z" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <line x1="96" y1="112" x2="160" y2="112" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <line x1="96" y1="144" x2="160" y2="144" 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 ChatCircleText = (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 ChatCircleText;