// ===== Icons =====
const Icon = ({ name, ...rest }) => {
const paths = {
search: ,
cart: ,
user: ,
heart: ,
chev: ,
chevR: ,
bolt: ,
grid: ,
plus: ,
minus: ,
close: ,
star: ,
eye: ,
compare: ,
truck: ,
shield: ,
refresh: ,
chat: ,
phone: ,
mail: ,
pin: ,
arrow: ,
gpu: ,
cpu: ,
mb: ,
ram: ,
ssd: ,
psu: ,
case: ,
cool: ,
mon: ,
kb: ,
ms: ,
head: ,
sparkle: ,
check: ,
discount: ,
headset: ,
fire: ,
crown: ,
};
return (
);
};
// ===== Stars =====
const Stars = ({ value = 5 }) => {
const full = Math.floor(value);
return (
{[0,1,2,3,4].map(i => (
))}
);
};
// ===== Money =====
const money = (n) => n.toLocaleString("en-US");
// ===== Placeholder media =====
const PHLabel = ({ children }) => (
// {children}
);
window.Icon = Icon;
window.Stars = Stars;
window.money = money;
window.PHLabel = PHLabel;