ionic-team / stencil

A toolchain for building scalable, enterprise-ready component systems on top of TypeScript and Web Component standards. Stencil components can be distributed natively to React, Angular, Vue, and traditional web developers from a single, framework-agnostic codebase.
https://stenciljs.com
Other
12.52k stars 782 forks source link

Make mermaid diagram colors configurable #2876

Closed oddcelot closed 3 weeks ago

oddcelot commented 3 years ago

Just stumbled upon this line in the markdown generator. Are there any overrides for the colors used here? 🤔

https://github.com/ionic-team/stencil/blob/45388e95edb46ef357eb9ae37cd32bbb5bc1ed23/src/compiler/docs/readme/markdown-dependencies.ts#L41

Maybe we could make this configurable via stencil.config.ts

Would make for great design cohesion, when using the docs in storybook for example 🙃

Tardigrada777 commented 3 months ago

I'm interested in taking on this issue. Here's a preliminary implementation plan, open to discussion and refinement:

My current understanding is that these colors correspond to the nodes representing individual components in the dependency tree diagram:

 content.push(`  style ${cmp.tag} fill:#f9f,stroke:#333,stroke-width:4px`); 

Please, let me know if I can start working on it. Thanks.

christian-bromann commented 3 months ago

@Tardigrada777 this sounds great! Let me know if I can support with anything in this endeavor. Join our Discord channel and ping me there 😉