Byteclaw / visage

Visage design system
https://visage.design
MIT License
12 stars 3 forks source link

[Popover/Popper] - make placement responsive #561

Closed michalkvasnicak closed 4 years ago

michalkvasnicak commented 4 years ago

Also make it responsive on all the dependants.

<Popover placement={[mobilePlacements, tabletPlacements, desktopPlacements]} />

Only problem is that we'll need to force responsive value because otherwise it'd be hart to detect a value because placement is an array itself. Maybe we could fix that by using not a tuple bot Placement object something like { placement: Placement, vertical: string, horizontal: string, transformX?: number, transformY?: number }. This way we could have placement?: Placement | (Placement | null | undefined)[]