Telegram-Mini-Apps / TelegramUI

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

Theme provider? #7

Closed sitenativedev closed 7 months ago

sitenativedev commented 8 months ago

Hello!

Congratulations, you've done a great job! How does the color variable management system work? As you probably know, Telegram provides some styles for use https://core.telegram.org/bots/webapps#themeparams. How can I use native colors in your package? Or should I write this myself for each component? I didn't see any tokens in the demo.

Thank you!

mainsmirnov commented 8 months ago

Hi, all variables are implemented and you can use our palette or your own.

You can check out code here: https://github.com/XeleneStudio/TelegramUI/blob/main/src/components/Service/AppRoot/AppRoot.module.css#L105

And list in the design: https://www.figma.com/file/AwAi6qE11mQllHa1sOROYp/Telegram-Mini-Apps-%C2%B7%C2%A0UI-Kit?type=design&node-id=14-2&mode=design

mainsmirnov commented 7 months ago

We didn't get any response back. Check out the detailed explanation on how to work with current palettes provided here. If you have any further questions after reviewing the documentation, feel free to reopen the issue

kesha-antonov commented 4 months ago

https://github.com/XeleneStudio/TelegramUI/blob/main/src/components/Service/AppRoot/AppRoot.module.css#L105

This helped

Added code example here https://github.com/Telegram-Mini-Apps/TelegramUI/issues/30#issuecomment-2253356257

Would be good to see this in docs also