MCPcopy Index your code
hub / github.com/ant-design/static-style-extract

github.com/ant-design/static-style-extract @v2.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.1.0 ↗ · + Follow
7 symbols 27 edges 11 files 0 documented · 0% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

@ant-design/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 npm download bundle size dumi

Install

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

Usage

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

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


use with custom theme

```tsx | pure
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>
));

use with blacklist or whitelist

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

const cssText = extractStyle({ includes: ['Button'] // Only Button style will be extracted });


## 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

@ant-design/static-style-extract is released under the MIT license.

Extension points exported contracts — how you extend this code

NodeProps (Interface)
(no doc)
src/index.tsx
ExtractStyleOptions (Interface)
(no doc)
src/index.tsx

Core symbols most depended-on inside this repo

extractStyle
called by 11
src/index.tsx
defaultRenderNode
called by 2
src/index.tsx
getComponentCustomizeRender
called by 1
src/index.tsx

Shape

Function 5
Interface 2

Languages

TypeScript100%

Modules by API surface

src/index.tsx5 symbols
tests/coverage.test.tsx2 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add static-style-extract \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page