phosphor-solid
Version:
A clean and friendly icon family for Solid-js
76 lines (75 loc) • 7.54 kB
JSX
/* GENERATED FILE */
import { useContext } from "solid-js";
import { IconContext } from "../lib";
const renderPathFor = (weight, color) => {
switch (weight) {
case "bold":
return (<>
<circle cx="136" cy="116" r="32" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/>
<line x1="32" y1="108.00005" x2="56" y2="108.00005" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/>
<line x1="32" y1="68.00005" x2="56" y2="68.00005" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/>
<line x1="32" y1="148.00005" x2="56" y2="148.00005" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/>
<line x1="32" y1="188.00005" x2="56" y2="188.00005" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/>
<rect x="40" y="48" width="192" height="160" rx="8" transform="translate(264 -8) rotate(90)" stroke-width="24" stroke={color} stroke-linecap="round" stroke-linejoin="round" fill="none"/>
<path d="M91.99963,167.20785a60.00083,60.00083,0,0,1,88.00067-.00007" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/>
</>);
case "duotone":
return (<>
<circle cx="136" cy="112" r="32" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
<path d="M208,32H64a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H208a8,8,0,0,0,8-8V40A8,8,0,0,0,208,32ZM136,144a32,32,0,1,1,32-32A32,32,0,0,1,136,144Z" opacity="0.2"/>
<line x1="32" y1="108.00005" x2="56" y2="108.00005" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
<line x1="32" y1="68.00005" x2="56" y2="68.00005" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
<line x1="32" y1="148.00005" x2="56" y2="148.00005" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
<line x1="32" y1="188.00005" x2="56" y2="188.00005" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
<path d="M87.99717,167.99792a60.00878,60.00878,0,0,1,96.004-.00225" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
<rect x="40" y="48" width="192" height="160" rx="8" transform="translate(264 -8) rotate(90)" stroke-width="16" stroke={color} stroke-linecap="round" stroke-linejoin="round" fill="none"/>
</>);
case "fill":
return (<>
<path d="M160,112a24,24,0,1,1-24-24A24.0275,24.0275,0,0,1,160,112Zm64-72V216a16.01833,16.01833,0,0,1-16,16H64a16.01833,16.01833,0,0,1-16-16V196H32a8,8,0,0,1,0-16H48V156H32a8,8,0,0,1,0-16H48V116H32a8,8,0,0,1,0-16H48V76H32a8,8,0,0,1,0-16H48V40A16.01833,16.01833,0,0,1,64,24H208A16.01833,16.01833,0,0,1,224,40ZM190.397,163.19141a67.80622,67.80622,0,0,0-27.42627-21.68067,40,40,0,1,0-53.94153-.00012,67.80949,67.80949,0,0,0-27.42858,21.68274,8,8,0,1,0,12.793,9.60937,52.0088,52.0088,0,0,1,83.21143-.00195,7.99961,7.99961,0,1,0,12.792-9.60937Z"/>
</>);
case "light":
return (<>
<circle cx="136" cy="112" r="32" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="12"/>
<line x1="32" y1="108.00005" x2="56" y2="108.00005" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="12"/>
<line x1="32" y1="68.00005" x2="56" y2="68.00005" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="12"/>
<line x1="32" y1="148.00005" x2="56" y2="148.00005" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="12"/>
<line x1="32" y1="188.00005" x2="56" y2="188.00005" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="12"/>
<path d="M87.99717,167.99792a60.00878,60.00878,0,0,1,96.004-.00225" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="12"/>
<rect x="40" y="48" width="192" height="160" rx="8" transform="translate(264 -8) rotate(90)" stroke-width="12" stroke={color} stroke-linecap="round" stroke-linejoin="round" fill="none"/>
</>);
case "thin":
return (<>
<circle cx="136" cy="112" r="32" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/>
<line x1="32" y1="108.00005" x2="56" y2="108.00005" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/>
<line x1="32" y1="68.00005" x2="56" y2="68.00005" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/>
<line x1="32" y1="148.00005" x2="56" y2="148.00005" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/>
<line x1="32" y1="188.00005" x2="56" y2="188.00005" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/>
<path d="M87.99717,167.99792a60.00878,60.00878,0,0,1,96.004-.00225" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/>
<rect x="40" y="48" width="192" height="160" rx="8" transform="translate(264 -8) rotate(90)" stroke-width="8" stroke={color} stroke-linecap="round" stroke-linejoin="round" fill="none"/>
</>);
case "regular":
return (<>
<circle cx="136" cy="112" r="32" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
<line x1="32" y1="108.00005" x2="56" y2="108.00005" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
<line x1="32" y1="68.00005" x2="56" y2="68.00005" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
<line x1="32" y1="148.00005" x2="56" y2="148.00005" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
<line x1="32" y1="188.00005" x2="56" y2="188.00005" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
<path d="M87.99717,167.99792a60.00878,60.00878,0,0,1,96.004-.00225" fill="none" stroke={color} stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
<rect x="40" y="48" width="192" height="160" rx="8" transform="translate(264 -8) rotate(90)" 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 AddressBook = (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 AddressBook;