TelegramUI icon indicating copy to clipboard operation
TelegramUI copied to clipboard

SegmentedControl dark mode not working

Open kallmetony opened this issue 1 year ago • 8 comments

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

image

image

kallmetony avatar Jul 12 '24 13:07 kallmetony

Same on PC image

kallmetony avatar Jul 12 '24 13:07 kallmetony

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?

toplenboren avatar Aug 21 '24 15:08 toplenboren

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

kayman233 avatar Aug 21 '24 20:08 kayman233

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

wdym

kallmetony avatar Aug 22 '24 11:08 kallmetony

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

toplenboren avatar Aug 22 '24 14:08 toplenboren

@toplenboren I use nextjs but sure, I do

Screenshot_20240823_105613_Samsung Internet

kallmetony avatar Aug 23 '24 07:08 kallmetony

@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

kayman233 avatar Aug 23 '24 09:08 kayman233

@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...

toplenboren avatar Aug 23 '24 13:08 toplenboren