
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
cc-next-dynamic-antd-theme
Advanced tools
Using cc-antd-theme-generator to change Ant Design theme dynamic for Next.js
Warning!
There are some problems in dark theme, for example the color of ant-menu-item-selected background-color (You can override these unexcepted color)
npm i next-dynamic-antd-theme
yarn add next-dynamic-antd-theme
See example
const generateTheme = require('next-dynamic-antd-theme/plugin');
const withAntdTheme = generateTheme({
antDir: path.join(__dirname, './node_modules/antd'),
stylesDir: path.join(__dirname, './theme'),
varFile: path.join(__dirname, './theme/vars.less'),
mainLessFile: path.join(__dirname, './theme/main.less'),
outputFilePath: path.join(__dirname, './.next/static/color.less'),
});
module.exports = withPlugins([withAntdTheme /* ... */], {
// xxx
});
<body>
<link
rel="stylesheet/less"
type="text/css"
href={`${getConfig().publicRuntimeConfig.prefix}_next/static/color.less`}
/>
<script
dangerouslySetInnerHTML={{
__html: `window.less = { async: false, env: 'production' };`,
}}
></script>
<script
type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/less.js/2.7.2/less.min.js"
></script>
<Main />
<NextScript />
</body>
where you want to change theme
import changeTheme from 'next-dynamic-antd-theme';
changeTheme({ '@primary-color': '#ff0000' }); // primary-color as red
changeTheme('default'); // Ant Design default theme
changeTheme('dark'); // Ant Design Dark theme

FAQs
A plugin for next to change ant design theme dynamicly
The npm package cc-next-dynamic-antd-theme receives a total of 18 weekly downloads. As such, cc-next-dynamic-antd-theme popularity was classified as not popular.
We found that cc-next-dynamic-antd-theme demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.