Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ant-design/static-style-extract

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ant-design/static-style-extract

support generate static css for SSR usage to generate raw css file for caching.

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2K
decreased by-54.45%
Maintainers
0
Weekly downloads
 
Created
Source

Static-Style-Extract

Provide a lib like @ant-design/static-style-extract to support generate static css for SSR usage to generate raw css file for caching.

NPM version build status Test coverage Dependencies DevDependencies npm download bundle size dumi

Install

npm install @ant-design/static-style-extract

Usage

import extractStyle from `@ant-design/static-style-extract`;

const cssText = extractStyle(); // :where(.css-bAMboOo).ant-btn ...

use with custom theme

import extractStyle from `@ant-design/static-style-extract`;

const cssText = extractStyle(); // :where(.css-bAMboOo).ant-btn ...

const cssText = extractStyle((node) => (
  <ConfigProvider theme={theme}>
    {node}
  </ConfigProvider>
));

Example

http://localhost:8000

online example: http://react-component.github.io/static-style-extract/

Development

npm install
npm start

Test Case

npm test

Coverage

npm run coverage

open coverage/ dir

License

static-style-extract is released under the MIT license.

Keywords

FAQs

Package last updated on 29 Aug 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc