onecart-ui
Version:
OneCart UI: Cross-platform design tokens + React & React Native components
13 lines (12 loc) • 2.01 kB
JavaScript
import React from 'react';
import { Svg, Path } from 'react-native-svg';
export const Pin = ({ size = 'md', color = 'currentColor', style, }) => {
const sizeMap = { xs: 16, sm: 20, md: 24, lg: 32, xl: 40 };
const iconSize = typeof size === 'number' ? size : sizeMap[size];
return (React.createElement(Svg, { width: iconSize, height: iconSize, viewBox: "0 0 24 24", fill: "none", style: style },
React.createElement(Path, { d: "M4.963 9.467V22.000H3.742V9.988H2.000L2.000 9.007L3.161 10.789L4.963 9.467Z", fill: color }),
React.createElement(Path, { d: "M9.022 6.338C10.860 6.338 12.000 7.515 12.000 8.985C12.000 10.345 11.485 11.338 10.014 12.882C8.691 14.279 6.117 16.852 2.184 20.786V22.000H19.021V18.360H10.308L7.662 20.713C10.161 18.213 11.889 16.522 12.808 15.602C15.051 13.397 16.191 11.117 16.191 8.764C16.191 7.882 16.007 4.941 12.845 3.323C11.117 2.478 8.213 2.000 5.676 3.213C2.662 4.647 2.037 7.367 2.000 7.441L5.713 8.985C6.081 7.772 7.110 6.338 9.022 6.338Z", fill: color }),
React.createElement(Path, { d: "M20.000 4.000H4.000C2.900 4.000 2.000 4.900 2.000 6.000V18.000C2.000 19.100 2.900 20.000 4.000 20.000H20.000C21.100 20.000 22.000 19.100 22.000 18.000V6.000C22.000 4.900 21.100 4.000 20.000 4.000ZM20.000 18.000H4.000V6.000H20.000V18.000Z", fill: color }),
React.createElement(Path, { d: "M17.806 6.095C16.164 6.095 15.848 4.591 15.788 4.394L13.751 5.205C14.641 8.350 17.727 8.192 17.806 8.192C20.180 8.192 21.130 6.768 21.288 6.510C21.921 5.541 22.000 4.057 21.268 3.029C20.932 2.554 20.477 2.218 19.923 2.000V7.539C14.641 7.341 14.977 7.025 15.274 6.590C15.788 5.778 15.887 4.473 15.234 3.484C15.076 3.266 14.186 2.000 12.030 2.000C9.537 2.000 8.588 3.780 8.370 4.453L10.328 5.264C10.546 4.631 11.021 3.998 12.010 3.998C12.880 3.998 13.494 4.512 13.494 5.284C13.494 6.431 12.406 6.708 11.753 6.708H10.843V8.686H11.832C18.617 3.009 19.567 3.484 19.567 4.572C19.567 5.541 18.617 6.095 17.806 6.095Z", fill: color })));
};
Pin.displayName = 'Pin';