~james/core

core/avatar/src/size.js -rw-r--r-- 208 bytes
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 16 hours ago
                                                                                
1
2
3
4
5
6
import { avatarWidths } from "../../web/src/lib/avatarWidths.ts";

export const widthFor = (size) => {
  if (size === "tiny") return 32;
  return avatarWidths.includes(Number(size)) ? Number(size) : null;
};