Skip to content

polmoneys/bendisiones-react

Repository files navigation

Work in progress Quick demo

My work involves complex UI in React, some patterns bring me joy & 🍀. Presented as Dumb (n), Smart-ish(6) and Inspired (3).

Latest addition useAnchor:

const { id, anchorName, placement, positionArea } = props;

const { anchorProps, Popover } = useAnchor({
  id,
  anchorName,
  placement,
  positionArea,
});

return (
  <>
    <Button {...anchorProps}>
      <IconHeartFill />
    </Button>

    <Popover className="neutral mxy" role="dialog">
      <p style={{ padding: 12 }}>I am a popover.</p>
      <p style={{ padding: 12 }}>
        placement: <strong>{String(placement)}</strong>
        <br />
        positionArea: <strong>{String(positionArea)}</strong>
      </p>
    </Popover>
  </>
);

Arigato gozaimas to React Aria, Tanstack-query and Nuqs for being such a joy to work with.

Inspiration 💐

Our requirements are more modest but at the same time more responsible: buildings, furniture, drinking glasses may well be consumer items that we can destroy without regret after they have served for some short or long period, but while we use them we expect them to full fill their role and serve us perfectly, so perfectly that we can also derive aesthetic enjoyment from observing them in use.

Erik Gunnar Asplund on Swedish Grace.

Contributors