GatewayImage: allow for background colours
commitc3736d1c6845f8a57b8253451f2d6d1c611726e9
authorMatilde Park <matilde.park@urbit.org>
dateWed 27 Apr 2022, 21:39 (4 years ago)
parent3d698c8
components/gateway/Image.js+9
@@ -34,6 +34,15 @@ const GatewayImage = ({
3434 );
3535 }
3636
37+ if (image?.startsWith("#")) {
38+ return (
39+ <div
40+ style={{ height: size, width: size, backgroundColor: image }}
41+ className="rounded-xl"
42+ />
43+ );
44+ }
45+
3746 return image ? (
3847 <img
3948 className="rounded-xl"