Steps to reproduce:
1 - npx degit solidjs/templates/ts my-app
2 - npm i -s solid-styled-components
3 - edit App.tsx with the follow content
4 - npm run dev
This super minimal example doesn't work:
App.tsx
import{styled,ThemeProvider}from"solid-styled-components";import{createSignal}from"solid-js";constdark={colors: {primary: "black"}};constlight={colors: {primary: "white"}};constContainer=styled('div')` width: 100vw; height: 100vh; background: ${props=>props.theme?.colors.primary};`;exportconstApp=()=>{const[isDarkMode,setIsDarkMode]=createSignal(false);consttoggleTheme=()=>{setIsDarkMode(!isDarkMode());};return(<ThemeProvidertheme={isDarkMode() ? dark : light}><Container><buttononClick={toggleTheme}>{isDarkMode() ? "Light" : "Dark"}Mode</button></Container></ThemeProvider>);};What is the proper way to toggle between these themes?
Steps to reproduce:
1 -
npx degit solidjs/templates/ts my-app2 -
npm i -s solid-styled-components3 - edit App.tsx with the follow content
4 -
npm run devThis super minimal example doesn't work:
App.tsxWhat is the proper way to toggle between these themes?