UNPKG

onecart-ui

Version:

OneCart UI: Cross-platform design tokens + React & React Native components

10 lines (9 loc) 1.18 kB
import React from 'react'; import { Svg, Path } from 'react-native-svg'; export const ShoppingCart = ({ 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: "M14.905 13.429C15.619 13.429 16.248 13.038 16.571 12.448L19.981 6.267C20.333 5.638 19.876 4.857 19.152 4.857H5.057L5.114 2.000H2.000V3.905H3.905L6.381 12.086L5.095 14.410C4.400 15.686 5.314 17.238 6.762 17.238H18.190V15.333H6.762L8.762 12.476H15.857ZM5.962 6.762H17.533L15.857 10.571H9.171L5.962 6.762ZM6.762 18.190C5.714 18.190 4.867 19.048 4.867 20.095C4.867 21.143 5.714 22.000 6.762 22.000C7.810 22.000 8.667 21.143 8.667 20.095C8.667 19.048 7.810 18.190 6.762 18.190ZM16.286 18.190C15.238 18.190 14.390 19.048 14.390 20.095C14.390 21.143 15.238 22.000 16.286 22.000C17.333 22.000 18.190 21.143 18.190 20.095C18.190 19.048 17.333 18.190 16.286 18.190Z", fill: color }))); }; ShoppingCart.displayName = 'ShoppingCart';