来源信息
- 仓库
- VirtusLab/scala-cli
- 最近来源活动
- 2026年10月1日 13:06
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 645
- 分支
- 169
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- website-react-components
- description
- TSX component conventions for the Scala CLI Docusaurus website.
# React components (website)
## Conventions
- Files: PascalCase `.tsx` (helpers `.ts`)
- Typed props (`type` / `interface`); `ReactNode` for children
- Style with Tailwind + `cn()` from `@site/src/lib/utils` or relative `../lib/utils`
- Inline Tailwind in JSX — do not export static layout `*ClassName` constants
- Keep components small; extract helpers to `*.ts` when logic grows
## MDX-facing helpers
`MarkdownComponents.tsx` (`ChainedSnippets`, `GiflikeVideo`) and `DownloadButton.tsx` are imported from docs. Prefer extensionless imports from MDX. Keep `.runnable-command` styles in `tokens.css`.
## Theme / swizzles
`src/theme/Root.tsx` — GTM / document shell only unless swizzling more chrome.
Local / swizzled chrome (do not revert to stock Infima look):
| Path | Role |
|------|------|
| `Navbar/Content` | Brand, search, GitHub, theme switch, mobile toggle |
| `Navbar/Logo` | Wordmark brand link |
| `NavbarItem/DropdownNavbarItem/Desktop` | Custom chevron dropdown |
| `Footer` | Product footer + external icons on `href` |
| `DocBreadcrumbs` (+ `Items/Home`) | Soft chips, clickable parents, House icon |
| `PaginatorNavLink` | Lucide chevrons instead of `«`/`»` |
Also under `src/components/`: `ThemeSwitch`, `NavbarDevTools`, `ScalaCliWordmark`, `HomeNavbarEffect`, sticky navs.
Product layout: [home-layout](../website-home-layout/SKILL.md). Docs: [docs-chrome](../website-docs-chrome/SKILL.md). Mobile: [responsive](../website-responsive/SKILL.md).
New files under `src/theme/**` often need a **yarn start restart**.
## Icons
Prefer **lucide-react** for product UI (benefits, use cases, chrome). Pass `LucideIcon` into `IconBox`; map use-case slugs in `UseCaseTile`. Do not reintroduce PNG icons for those cards.
在 GitHub 查看