Telegram-Mini-Apps / TelegramUI

React components library for Telegram Mini Apps inspired by Telegram interface
https://ton.org/mini-apps
MIT License
368 stars 30 forks source link

Use the Popper component without an arrow #67

Open erickskrauch opened 1 month ago

erickskrauch commented 1 month ago

How can I do that? Our design requires no arrow. But I can't remove the arrow in any way :(

mainsmirnov commented 1 month ago

Hi, you can pass empty component as an arrow.

const EmptyArrow = () => null;
return (
    <Popper targetRef={ref} ArrowIcon={EmptyArrow}>
      <Caption level="1">Hello</Caption>
    </Popper>
);
erickskrauch commented 1 month ago

Nice solution :+1: But I would suggest just allowing passing null to archive the same behavior.