Page MenuHomePhabricator

position the popover based on a prop
Closed, ResolvedPublic



Popovers do not have states, but we need to make it possible for implementers to define their position in relation to the element that triggers them (see notes):

  • Top: right, center, left
  • Bottom: right, center, left
  • Left: bottom, center, top
  • Right: bottom, center, top

implementation notes

  • implement position prop that takes up to two strings
  • implement prop validation

Open Questions:

  • the prop should have some reasonable defaults, both if it is not provided at all and if it gets only a single string
    • if prop is not given then the default is top-center
    • if only a single string then the default is center as the secondary position