Telegram-Mini-Apps / TelegramUI

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

SegmentedControl dark mode not working #42

Open kallmetony opened 4 months ago

kallmetony commented 4 months ago

Its not working on both Android and IOS. Light theme looks fine.

image

image

kallmetony commented 4 months ago

Same on PC image

toplenboren commented 3 months ago

Hey, @kallmetony, or @kayman233 do you maybe have a reproduction repo? I was not able to replicate this issue

Are you sure you get theme variables correctly?

kayman233 commented 3 months ago

Hello @toplenboren I fixed my issue by making sure the right value is in AppRoot's appearance prop.

kallmetony commented 3 months ago

Hello @toplenboren I fixed my issue by making sure the right value is in AppRoot's appearance prop.

wdym

toplenboren commented 3 months ago

@kallmetony do you have your app wrapped by <AppRoot>...</AppRoot>?

kallmetony commented 3 months ago

@toplenboren I use nextjs but sure, I do

Screenshot_20240823_105613_Samsung Internet

kayman233 commented 3 months ago

@kallmetony you can check how it should be specified with appearance prop in the template example: https://github.com/Telegram-Mini-Apps/nextjs-template/blob/master/src/components/Root/Root.tsx#L44

toplenboren commented 3 months ago

@toplenboren I use nextjs but sure, I do

Screenshot_20240823_105613_Samsung Internet

hmm, might be smth with SSR, not sure if theme as available while rendering on server...