How to modify theme components under dark mode

The dark mode toggled from the icon in the upper right corner of Discourse. I tried modifying the theme component, but it only works for Discourse’s dark mode after switching the phone system. If the user switches to dark mode using the icon in the upper right corner, it doesn’t work.