How to use dark theme in forge UI

I am building a Forge application with a custom UI, and I took reference from this page to create the UI page: https://atlassian.design/components/form/examples. Now, after deploying, when I switch my Jira to dark theme, my application does not convert to dark theme. What do I need to change in my code? Currently, I have similar code to this form: https://atlassian.design/components/form/examples#default.