SolidZORO / next-plugin-antd-less

🎩 Use Antd (Less) with Next.js v12, Zero Dependency on other Next-Plugins.
MIT License
345 stars 48 forks source link

dynamic variables #50

Closed amirjr1378 closed 3 years ago

amirjr1378 commented 3 years ago

i have to change my palette base on request , with latest less in window we have less.modifyVars({ '@bgColor': 'blue', '@textColor': 'red' });

but i dont have it when i use this package

SolidZORO commented 3 years ago

request?

Once the content of modifyVars is set, it cannot be changed except by restarting the server.

If you want to change it dynamically, modify the .less file, or append style to the end of the body.

amirjr1378 commented 3 years ago

by request means api , i get palette from api

amirjr1378 commented 3 years ago

how can i modify .less file dynamically?

SolidZORO commented 3 years ago

get api data, and append to html body. data be a